cp's OEIS Frontend

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.

A348906 Squares with a square number of 1's in their binary expansion.

Original entry on oeis.org

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

Views

Author

Ctibor O. Zizka, Nov 03 2021

Keywords

Comments

If a number k is of the form 2^(2*r), r >= 0, then k is included in this sequence.

Examples

			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.
		

Crossrefs

Intersection of A000290 and A084561.

Programs

  • 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 *)
  • PARI
    isok(k) = issquare(k) && issquare(hammingweight(k)); \\ Michel Marcus, Nov 03 2021