This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A214560 #33 Nov 25 2024 12:15:03 %S A214560 1,0,2,2,4,2,4,3,6,4,4,2,6,4,5,4,8,6,6,4,6,3,4,7,8,5,6,4,7,5,6,5,10,8, %T A214560 8,6,8,5,6,4,8,6,5,4,6,3,9,8,10,7,7,7,8,4,6,5,9,6,7,5,8,6,7,6,12,10, %U A214560 10,8,10,7,8,6,10,7,7,4,8,6,6,8,10,7,8,5,7 %N A214560 Number of 0's in binary expansion of n^2. %C A214560 Conjecture: for every x>=0 there is an i such that a(n)>x for n>i. %C A214560 Comment from _N. J. A. Sloane_, Nov 21 2013: See also the conjecture in A231898. %H A214560 Reinhard Zumkeller, <a href="/A214560/b214560.txt">Table of n, a(n) for n = 0..10000</a> %F A214560 a(n) = A023416(A000290(n)). %p A214560 A214560 := proc(n) %p A214560 A023416(n^2) ; %p A214560 end proc: # _R. J. Mathar_, Jul 21 2012 %p A214560 # second Maple program: %p A214560 a:= n-> `if`(n=0, 1, add(1-i, i=Bits[Split](n^2))): %p A214560 seq(a(n), n=0..84); # _Alois P. Heinz_, Nov 25 2024 %t A214560 Join[{1},Table[DigitCount[n^2,2,0],{n,100}]] (* _Harvey P. Dale_, Nov 24 2024 *) %o A214560 (Python) %o A214560 for n in range(300): %o A214560 b = n*n %o A214560 c = 0 %o A214560 while b>0: %o A214560 c += 1-(b&1) %o A214560 b//=2 %o A214560 print(c+(n==0), end=', ') %o A214560 (PARI) vector(66,n,b=binary((n-1)^2);sum(j=1,#b,1-b[j])) /* _Joerg Arndt_, Jul 21 2012 */ %o A214560 (Haskell) %o A214560 a214560 = a023416 . a000290 -- _Reinhard Zumkeller_, Nov 20 2013 %o A214560 (Python) %o A214560 def A214560(n): %o A214560 return bin(n*n)[2:].count('0') # _Chai Wah Wu_, Sep 03 2014 %Y A214560 Cf. A000120, A000290, A023416, A078565, A159918, A231898. %K A214560 base,nonn %O A214560 0,3 %A A214560 _Alex Ratushnyak_, Jul 21 2012