login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

n-th bit in binary expansion of square root of n.
0

%I #7 May 15 2016 14:44:02

%S 1,0,0,0,1,1,0,1,0,1,0,1,0,1,1,0,0,0,0,1,0,0,1,0,0,1,1,0,0,0,1,1,0,0,

%T 0,0,1,0,1,0,1,0,0,1,0,0,1,1,0,1,1,1,1,1,1,1,1,0,1,0,0,0,1,0,1,0,1,0,

%U 1,0,0,1,0,1,1,0,0,1,0,0,0,0,0,0,1,0,1,0,0,0,1,1,0,1,1,1,0,0,1,0,1,0

%N n-th bit in binary expansion of square root of n.

%t Array[ Function[ n, RealDigits[ N[ Sqrt[ n ], n+6 ], 2 ]// (#[ [ 1, n ] ])& ], 110 ]

%t Table[RealDigits[Sqrt[n],2,n+2][[1,n]],{n,110}] (* _Harvey P. Dale_, May 15 2016 *)

%K nonn,base

%O 1,1

%A _Olivier GĂ©rard_