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.

A216451 Numbers which are simultaneously of the form x^2+y^2, x^2+2y^2, x^2+3y^2, x^2+7y^2, all with x>0, y>0.

Original entry on oeis.org

193, 337, 457, 673, 772, 1009, 1033, 1129, 1201, 1297, 1348, 1737, 1801, 1828, 1873, 2017, 2137, 2377, 2473, 2521, 2689, 2692, 2713, 2857, 3033, 3049, 3088, 3217, 3313, 3361, 3529, 3600, 3697, 3889, 4036, 4057, 4113, 4132, 4153, 4201, 4516, 4561, 4624, 4657
Offset: 1

Views

Author

V. Raman, Sep 07 2012

Keywords

Comments

A number can be written as a^2+b^2 if and only if it has no prime factor congruent to 3 (mod 4) raised to an odd power.
A number can be written as a^2+2*b^2 if and only if it has no prime factor congruent to 5 (mod 8) or 7 (mod 8) raised to an odd power.
A number can be written as a^2+3*b^2 if and only if it has no prime factor congruent to 2 (mod 3) raised to an odd power.
A number can be written as a^2+7*b^2 if and only if it has no prime factor congruent to 3 (mod 7) or 5 (mod 7) or 6 (mod 7) raised to an odd power. Also the power of 2 should not be 1, if it can be written in the form a^2+7*b^2.

Crossrefs

Intersection of A001481, A002479, A003136 and A020670, omitting squares. See also A216500. - N. J. A. Sloane, Sep 11 2012

Programs

  • Mathematica
    nn = 4657; lim = Floor[Sqrt[nn]]; t1 = Select[Union[Flatten[Table[a^2 + b^2, {a, lim}, {b, lim}]]], # <= nn &]; t2 = Select[Union[Flatten[Table[a^2 + 2*b^2, {a, lim}, {b, lim/Sqrt[2]}]]], # <= nn &]; t3 = Select[Union[Flatten[Table[a^2 + 3*b^2, {a, lim}, {b, lim/Sqrt[3]}]]], # <= nn &]; t7 = Select[Union[Flatten[Table[a^2 + 7*b^2, {a, lim}, {b, lim/Sqrt[7]}]]], # <= nn &]; Intersection[t1, t2, t3, t7] (* T. D. Noe, Sep 08 2012 *)

Extensions

Definition clarified by N. J. A. Sloane, Sep 11 2012