login
A099972
Write 1/sqrt(2) as a binary fraction; read this from left to right and whenever a 1 appears, note the integer formed by reading leftwards from that 1.
11
1, 5, 13, 45, 173, 8365, 73901, 204973, 467117, 991405, 5185709, 13574317, 80683181, 214900909, 1288642733, 3436126381, 7731093677, 16321028269, 33500897453, 67860635821, 136580112557, 686335926445, 1785847554221
OFFSET
0,2
LINKS
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