A173346 Numbers such that the product of numbers of 0's and 1's in the binary representation is equal to the square root of the number.
0, 4, 16, 144, 324, 625
Offset: 1
Examples
625 -> 1001110001; five '0' and five '1'; 5*5=25; sqrt(625)=25. 324 -> 101000100; 3 '0' and 6 '1'; 3*6=18; sqrt(324)=18.
Crossrefs
Cf. A071295.
Programs
-
Mathematica
Select[Range[8! ],DigitCount[ #,2,0]*DigitCount[ #,2,1]==Sqrt[ # ]&]
-
PARI
isok(n) = {n1 = hammingweight(n); n0 = #binary(n) - n1; (n0*n1)^2 == n;} \\ Michel Marcus, Nov 19 2015
Formula
Terms satisfy m = A071295(m)^2. - Michel Marcus, Nov 19 2015
Extensions
Minor edits by N. J. A. Sloane, Feb 21 2010
a(1) = 0 inserted by Michel Marcus, Nov 19 2015
Comments