OFFSET
0,2
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..1000
EXAMPLE
1/sqrt(2) = 0.7071067811865475244008443621048490392848359376885... = 0.10110101000001001111001100110011111110011101111001100100100001000101100101111101100010011011 in binary.
MATHEMATICA
d = 100; l = First[RealDigits[N[1/Sqrt[2], d], 2]]; Do[m = Take[l, n]; k = Length[m]; If[m[[k]] == 1, Print[FromDigits[Reverse[m], 2]]], {n, 1, d}] (* Ryan Propper, Aug 18 2005 *)
Module[{rd=RealDigits[1/Sqrt[2], 2, 50][[1]], pos}, pos=Flatten[Position[rd, 1]]; Table[ FromDigits[ Reverse[Take[rd, n]], 2], {n, pos}]] (* Harvey P. Dale, Jul 29 2013 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Nov 13, 2004, based on correspondence from Artur Jasinski, Mar 25 2003
EXTENSIONS
More terms from Ryan Propper, Aug 18 2005
STATUS
approved