editing
approved
editing
approved
a[1] = 1; a[n_] := a[n] = Block[{k = a[n - 1] + 1, s = Plus @@ (1/Table[a[i], {i, n - 1}])}, While[ Log[2, Max[ContinuedFraction[s + 1/k]]] != n, k++ ]; k]; Do[ Print[ a[n]], {n, 17}] (from _* _Robert G. Wilson v_, Aug 08 2005 *)
approved
editing
_Ryan Propper (rpropper(AT)stanford.edu), _, Aug 06 2005
a[1] = 1; a[n_] := a[n] = Block[{k = a[n - 1] + 1, s = Plus @@ (1/Table[a[i], {i, n - 1}])}, While[ Log[2, Max[ContinuedFraction[s + 1/k]]] != n, k++ ]; k]; Do[ Print[ a[n]], {n, 17}] (from _Robert G. Wilson v (rgwv(AT)rgwv.com), _, Aug 08 2005)
a[1] = 1; a[n_] := a[n] = Block[{k = a[n - 1] + 1, s = Plus @@ (1/Table[a[i], {i, n - 1}])}, While[ Log[2, Max[ContinuedFraction[s + 1/k]]] != n, k++ ]; k]; Do[ Print[ a[n]], {n, 17}] (from RGWv Robert G. Wilson v (rgwv(AT)rgwv.com), Aug 08 2005)
nonn,new
nonn
a(1) = 1; a(n) is the smallest integer greater than a(n-1) such that the largest element in the simple continued fraction for S(n)=1/a(1)+1/a(2)+...+1/a(n) equals 2^n.
1, 4, 30, 85, 91, 401, 1160, 2338, 13392, 31765, 39040, 442431, 667330, 12260875, 12882668, 33163533, 35682489
1,2
The continued fraction for S(5) = 1 + 1/4 + 1/30 + 1/85 + 1/91 is [1, 3, 3, 1, 2, 1, 11, 32, 5] where the largest element is 32 = 2^5 and 91 is the smallest integer > 85 with this property.
a[1] = 1; a[n_] := a[n] = Block[{k = a[n - 1] + 1, s = Plus @@ (1/Table[a[i], {i, n - 1}])}, While[ Log[2, Max[ContinuedFraction[s + 1/k]]] != n, k++ ]; k]; Do[ Print[ a[n]], {n, 17}] (from RGWv (rgwv(AT)rgwv.com), Aug 08 2005)
(PARI) s=1; t=1; for(n=2, 50, s=s+1/t; while(abs(2^n-vecmax(contfrac(s+1/t)))>0, t++); print1(t, ", "))
nonn
Ryan Propper (rpropper(AT)stanford.edu), Aug 06 2005
approved