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.

Showing 1-9 of 9 results.

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

A216501 Let S_k = {x^2+k*y^2: x,y positive integers}. How many out of S_1, S_2, S_3, S_7 does n belong to?

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 2, 0, 0, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 2, 1, 2, 0, 2, 3, 1, 1, 1, 2, 0, 3, 2, 1, 0, 0, 2, 1, 1, 1, 2, 2, 1, 0, 1, 2, 1, 1, 0, 2, 0, 1, 2, 1, 1, 3, 2, 0, 0, 1, 3, 3, 1, 1, 2, 1, 0, 2, 1, 1, 2, 1, 1, 1, 1, 0, 2, 2, 1, 1, 1, 1, 0, 0, 1, 3, 1, 2, 2, 1, 1, 1, 1, 0, 1, 2, 2, 3, 0, 1, 2, 3, 1, 0, 2, 2, 1, 0, 0
Offset: 1

Views

Author

V. Raman, Sep 07 2012

Keywords

Comments

"If a composite number C is of the form a^2 + kb^2 for some integers a & b, then every prime factor P (of C) raised to an odd power is of the form c^2 + kd^2, for some integers c & d."
This statement is only true for k = 1, 2, 3. For k = 7, with the exception of the prime factor 2, the statement mentioned above is true.
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 + 2b^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 + 3b^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 + 7b^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 and the exponent of 2 is not 1.

Crossrefs

Programs

  • PARI
    for(n=1, 100, sol=0; for(x=1, 100, if(issquare(n-x*x)&&n-x*x>0, sol++; break)); for(x=1, 100, if(issquare(n-2*x*x)&&n-2*x*x>0, sol++; break)); for(x=1, 100, if(issquare(n-3*x*x)&&n-3*x*x>0, sol++; break)); for(x=1, 100, if(issquare(n-7*x*x)&&n-7*x*x>0, sol++; break)); print1(sol", ")) /* V. Raman, Oct 16 2012 */

Formula

a(n) = 0 for almost all n. - Charles R Greathouse IV, Sep 14 2012

Extensions

Edited by N. J. A. Sloane, Sep 11 2012

A216671 Let S_k = {x^2+k*y^2: x,y nonnegative integers}. How many out of S_1, S_2, S_3, S_7 does n belong to?

Original entry on oeis.org

4, 2, 2, 4, 1, 1, 2, 3, 4, 1, 2, 2, 2, 0, 0, 4, 2, 2, 2, 1, 1, 1, 1, 1, 4, 1, 2, 2, 2, 0, 1, 3, 1, 2, 0, 4, 3, 1, 1, 1, 2, 0, 3, 2, 1, 0, 0, 2, 4, 2, 1, 2, 2, 1, 0, 1, 2, 1, 1, 0, 2, 0, 2, 4, 1, 1, 3, 2, 0, 0, 1, 3, 3, 1, 2, 2, 1, 0, 2, 1, 4, 2, 1, 1, 1, 1, 0, 2, 2, 1, 1, 1, 1, 0, 0, 1, 3, 2, 2, 4, 1, 1, 1, 1, 0, 1, 2, 2, 3, 0, 1, 2, 3, 1, 0, 2, 2, 1, 0, 0
Offset: 1

Views

Author

V. Raman, Sep 13 2012

Keywords

Comments

"If a composite number C is of the form a^2 + kb^2 for some integers a & b, then every prime factor of C raised to an odd power is of the form c^2 + kd^2 for some integers c & d."
This statement is only true for k = 1, 2, 3.
For k = 7, with the exception of the prime factor 2, the statement mentioned above is true.
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 + 2b^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 + 3b^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 + 7b^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, and the exponent of 2 is not 1.
Comment from N. J. A. Sloane, Sep 14 2012: S_1, S_2, S_3, S_7 are the first four quadratic forms with class number 1. (See Cox, for example.)

References

  • David A. Cox, Primes of the Form x^2 + n y^2, Wiley, 1989. - From N. J. A. Sloane, Sep 14 2012

Crossrefs

Programs

  • PARI
    for(n=1, 100, sol=0; for(x=0, 100, if(issquare(n-x*x)&&n-x*x>=0, sol++; break)); for(x=0, 100, if(issquare(n-2*x*x)&&n-2*x*x>=0, sol++; break)); for(x=0, 100, if(issquare(n-3*x*x)&&n-3*x*x>=0, sol++; break)); for(x=0, 100, if(issquare(n-7*x*x)&&n-7*x*x>=0, sol++; break)); print1(sol", ")) /* V. Raman, Oct 16 2012 */

Formula

The fraction of terms with a(n)>0 goes to zero as n increases. - Charles R Greathouse IV, Sep 11 2012

Extensions

Edited by N. J. A. Sloane, Sep 14 2012

A216679 Numbers which can be written neither as a^2+b^2, nor as a^2+2*b^2, nor as a^2+3*b^2, nor as a^2+7*b^2, with a >= 0 and b >= 0.

Original entry on oeis.org

14, 15, 30, 35, 42, 46, 47, 55, 60, 62, 69, 70, 78, 87, 94, 95, 105, 110, 115, 119, 120, 126, 135, 138, 140, 141, 142, 143, 154, 155, 158, 159, 165, 167, 168, 174, 182, 186, 188, 190, 195, 206, 210, 213, 215, 220, 222, 230, 231, 235, 238, 240, 248, 254, 255, 266, 270, 276, 280, 282, 285, 286, 287, 295, 299
Offset: 1

Views

Author

V. Raman, Sep 13 2012

Keywords

Comments

If a composite number C, in case, can be written in the form C = a^2+k*b^2, for some integers a & b, then every prime factor P (for C) being raised to an odd power can be written in the form P = c^2+k*d^2, for some integers c & d.
This statement is only true for k = 1, 2, 3.
For k = 7, with the exception of the prime factor 2, the statement mentioned above is true.

Crossrefs

A216680 Numbers which can be written neither as a^2+b^2, nor as a^2+2*b^2, nor as a^2+3*b^2, nor as a^2+7*b^2, with a > 0 and b > 0.

Original entry on oeis.org

1, 14, 15, 30, 35, 42, 46, 47, 55, 60, 62, 69, 70, 78, 87, 94, 95, 105, 110, 115, 119, 120, 126, 135, 138, 140, 141, 142, 143, 154, 155, 158, 159, 165, 167, 168, 174, 182, 186, 188, 190, 195, 206, 210, 213, 215, 220, 222, 230, 231, 235, 238, 240, 248, 254, 255, 266, 270, 276, 280, 282, 285, 286, 287, 295, 299
Offset: 1

Views

Author

V. Raman, Sep 13 2012

Keywords

Comments

If a composite number C, in case, can be written in the form C = a^2+k*b^2, for some integers a & b, then every prime factor P (for C) being raised to an odd power can be written in the form P = c^2+k*d^2, for some integers c & d.
This statement is only true for k = 1, 2, 3.
For k = 7, with the exception of the prime factor 2, the statement mentioned above is true.
Essentially the same as A216679. - R. J. Mathar, Sep 16 2012

Crossrefs

A216682 Perfect squares which can be written in all the four forms a^2+b^2, a^2+2*b^2, a^2+3*b^2 and a^2+7*b^2, with a > 0 and b > 0.

Original entry on oeis.org

3600, 4624, 12100, 12321, 14400, 18496, 20449, 24336, 26896, 30276, 32400, 37249, 41616, 46225, 48400, 49284, 51076, 57600, 73984, 75076, 81796, 85264, 90000, 97344, 101124, 106929, 107584, 108900, 110889, 112225, 113569, 115600, 121104, 126736, 129600, 139876, 144400, 148225, 148996, 150544, 165649, 166464, 176400, 184041, 184900, 193600, 197136
Offset: 1

Views

Author

V. Raman, Sep 13 2012

Keywords

Comments

If a composite number C, say, can be written in the form C = a^2+k*b^2, for some integers a & b, then every prime factor P (for C) being raised to an odd power can be written in the form P = c^2+k*d^2, for some integers c & d.
This statement is only true for k = 1, 2, 3.
For k = 7, with the exception of the prime factor 2, the statement mentioned above is true.

Crossrefs

A216828 Numbers whose squares can be written in all the four forms a^2 + b^2, a^2 + 2*b^2, a^2 + 3*b^2 and a^2 + 7*b^2, with a > 0 and b > 0.

Original entry on oeis.org

60, 68, 110, 111, 120, 136, 143, 156, 164, 174, 180, 193, 204, 215, 220, 222, 226, 240, 272, 274, 286, 292, 300, 312, 318, 327, 328, 330, 333, 335, 337, 340, 348, 356, 360, 374, 380, 385, 386, 388, 407, 408, 420, 429, 430, 440, 444, 452, 457, 466, 468, 476, 480, 492, 522, 540, 544, 548, 550, 551, 555, 559, 562, 572, 579, 584
Offset: 1

Views

Author

V. Raman, Sep 17 2012

Keywords

Comments

If a composite number C can be written in the form C = a^2 + k*b^2, for some integers a and b, then every prime factor P (for C) being raised to an odd power can be written in the form P = c^2 + k*d^2, for some integers c and d.
This statement is only true for k = 1, 2, 3.
For k = 7, with the exception of the prime factor 2, the statement mentioned above is true.

Crossrefs

Programs

  • Maple
    filter:= proc(n) local L,x,y;
      select(t -> subs(t, x*y) > 0, [isolve(n^2=x^2+y^2)]) <> []
      and select(t -> subs(t, x*y) > 0, [isolve(n^2=x^2+2*y^2)]) <> []
      and select(t -> subs(t, x*y) > 0, [isolve(n^2=x^2+3*y^2)]) <> []
      and select(t -> subs(t, x*y) > 0, [isolve(n^2=x^2+7*y^2)]) <> []
    end proc:
    select(filter, [$1..1000]); # Robert Israel, May 03 2018
  • Mathematica
    okQ[n_] := Module[{x, y}, AllTrue[{1, 2, 3, 7}, Solve[x > 0 && y > 0 && n^2 == x^2 + #*y^2, {x, y}, Integers] =!= {}&]];
    Select[Range[1000], okQ] (* Jean-François Alcover, May 23 2023 *)

A216408 Perfect squares which can be written neither as a^2+b^2, nor as a^2+2*b^2, nor as a^2+3*b^2, nor as a^2+7*b^2, with a > 0 and b > 0.

Original entry on oeis.org

1, 2209, 27889, 96721, 146689, 229441, 253009, 418609, 516961, 703921, 786769, 966289, 1324801, 1495729, 1739761, 2211169, 2283121, 2430481, 3323329, 3411409, 4255969, 4879681, 5527201, 5755201, 7091569, 7219969, 8427409, 8994001, 9138529, 10029889, 10182481, 11282881, 11607649, 12439729, 13476241, 14922769, 15295921
Offset: 1

Views

Author

V. Raman, Sep 17 2012

Keywords

Comments

If a composite number C, in case, can be written in the form C = a^2+k*b^2, for some integers a & b, then every prime factor P (for C) being raised to an odd power can be written in the form P = c^2+k*d^2, for some integers c & d.
This statement is only true for k = 1, 2, 3.
For k = 7, with the exception of the prime factor 2, the statement mentioned above is true.

Crossrefs

A216827 Numbers whose squares can be written neither as a^2 + b^2, nor as a^2 + 2*b^2, nor as a^2 + 3*b^2, nor as a^2 + 7*b^2, with a > 0 and b > 0.

Original entry on oeis.org

1, 47, 167, 311, 383, 479, 503, 647, 719, 839, 887, 983, 1151, 1223, 1319, 1487, 1511, 1559, 1823, 1847, 2063, 2209, 2351, 2399, 2663, 2687, 2903, 2999, 3023, 3167, 3191, 3359, 3407, 3527, 3671, 3863, 3911, 4007, 4079, 4583, 4679, 4703, 4751, 4871, 4919, 5039, 5087, 5351, 5519, 5591, 5711, 5879, 5927
Offset: 1

Views

Author

V. Raman, Sep 17 2012

Keywords

Comments

If a composite number C can be written in the form C = a^2+k*b^2, for some integers a and b, then every prime factor P (for C) being raised to an odd power can be written in the form P = c^2+k*d^2, for some integers c and d.
This statement is only true for k = 1, 2, 3.
For k = 7, with the exception of the prime factor 2, the statement mentioned above is true.

Crossrefs

Showing 1-9 of 9 results.