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.

A051213 Numbers of the form 2^x-y^2 >= 0.

Original entry on oeis.org

0, 1, 2, 3, 4, 7, 8, 12, 15, 16, 23, 28, 31, 32, 39, 47, 48, 55, 60, 63, 64, 71, 79, 87, 92, 103, 112, 119, 124, 127, 128, 135, 151, 156, 175, 183, 188, 192, 199, 207, 220, 223, 231, 240, 247, 252, 255, 256, 271, 284, 287, 295, 316, 343, 348, 367, 368, 375, 391, 399, 412, 431, 448
Offset: 1

Views

Author

Keywords

Comments

Is 519 in this sequence? Then this is the value of a(73), else it is 527, after which the sequence goes on with 540, 583, 604, 615, 623, 624,... - M. F. Hasler, Oct 09 2014
From R. J. Mathar, Oct 21 2014: (Start)
519 is not in the sequence. [Proof: Consider 2^x-519=y^2 and both sides modulo 3.
Then 2^x-519 = 1,2,1,2.... (mod 3) for x>=0 and y^2=0,1,1,0,1,1,... (mod 3) for y>=0.
For moduli to match (i.e, both 1), x must be even. Then 2^x is the square of the integer y=2^(x/2). (Note that this reference does not work in integers if x is odd).
The next smaller perfect square is (y-1)^2 = (2^(x/2)-1)^2 = 2^x-2^(1+x/2)+1 .
This must be >=2^x-519 to have a solution, so -2^(1+x/2)+1 >= -519
implies 2^(1+x/2)-1 <= 519, which implies 1+x/2 <= 9.02 and x<=16.
One can check numerically that the range 0<=x<=16 do not form perfect squares 2^x-519.] (End)

Crossrefs

Cf. A201125.

Programs

  • Mathematica
    max = 1000; Clear[f]; f[m_] := f[m] = Select[Table[2^x - y^2, {x, 0, m}, {y, 0, Ceiling[2^(x/2)]}] // Flatten // Union, 0 <= # <= max &]; f[1]; f[m = 2]; While[f[m] != f[m - 1], m++]; Print["m = ", m]; A051213 = f[m] (* Jean-François Alcover, May 13 2017 *)
  • PARI
    is_A051213(n)=!A200522(n) \\ M. F. Hasler, Oct 09 2014

Extensions

More terms from M. F. Hasler, Oct 09 2014