login
A348906
Squares with a square number of 1's in their binary expansion.
0
0, 1, 4, 16, 64, 169, 225, 256, 676, 900, 1024, 2209, 2704, 3600, 4096, 5625, 7921, 8836, 10201, 10816, 12321, 13689, 14400, 16384, 19321, 20449, 22201, 22500, 23409, 26569, 27889, 28561, 29929, 30625, 31684, 32041, 35344, 38809, 40401, 40804, 43264, 49284, 52441
OFFSET
1,3
COMMENTS
If a number k is of the form 2^(2*r), r >= 0, then k is included in this sequence.
EXAMPLE
225 is in the sequence because it is a square and the number of 1's in the binary expansion of 225 is 4 which is a square.
MAPLE
q:= n-> issqr(add(i, i=Bits[Split](n))):
select(q, [i^2$i=0..250])[]; # Alois P. Heinz, Nov 03 2021
MATHEMATICA
Select[Range[0, 300]^2, IntegerQ @ Sqrt[DigitCount[#, 2, 1]] &] (* Amiram Eldar, Nov 03 2021 *)
PROG
(PARI) isok(k) = issquare(k) && issquare(hammingweight(k)); \\ Michel Marcus, Nov 03 2021
CROSSREFS
Intersection of A000290 and A084561.
Sequence in context: A330687 A027676 A249567 * A177398 A343200 A227312
KEYWORD
nonn,base
AUTHOR
Ctibor O. Zizka, Nov 03 2021
STATUS
approved