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.

A126726 Number of squares (of nonnegative integers) that require n binary (base-2) digits.

Original entry on oeis.org

0, 2, 0, 1, 1, 2, 2, 4, 4, 7, 9, 14, 18, 27, 37, 54, 74, 107, 149, 213, 299, 425, 599, 849, 1199, 1697, 2399, 3394, 4798, 6787, 9597, 13573, 19195, 27146, 38390, 54292, 76780, 108584, 153560, 217168, 307120, 434335, 614241, 868669, 1228483, 1737338, 2456966
Offset: 0

Views

Author

Andrew G. West (westa(AT)wlu.edu), Mar 13 2007

Keywords

Comments

Binary equivalent to A062940, which uses decimal representation.

Examples

			21^2 = 441 = 110111001_2, requiring 9 digits.
		

Crossrefs

Cf. A062940.

Programs

  • Maple
    r:= proc(n) local b; b:= isqrt(n); b+`if`(b^2 `if`(n=0, 0, r(2^n) -r(2^(n-1)) +`if`(n=1, 1, 0)):
    seq(a(n), n=0..50);  # Alois P. Heinz, Sep 13 2012

Formula

Conjecture: a(n) = A190568(n)-(-1)^n for n>0. - R. J. Mathar, May 21 2025