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-7 of 7 results.

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 *)

A217462 a(n) is the sum of total number of nonnegative integer solutions to each of a^2 + b^2 = n, a^2 + 2*b^2 = n, a^2 + 3*b^2 = n and a^2 + 7*b^2 = n. (Order does not matter for the equation a^2+b^2 = n).

Original entry on oeis.org

4, 2, 2, 5, 1, 1, 2, 3, 5, 1, 2, 3, 2, 0, 0, 6, 2, 3, 2, 1, 1, 1, 1, 1, 5, 1, 3, 4, 2, 0, 1, 4, 2, 2, 0, 6, 3, 1, 1, 1, 2, 0, 3, 2, 1, 0, 0, 3, 5, 3, 2, 4, 2, 2, 0, 1, 3, 1, 1, 0, 2, 0, 2, 7, 2, 2, 3, 2, 0, 0, 1, 4, 3, 1, 2, 4, 1, 0, 2, 1, 6, 2, 1, 3, 2, 1, 0, 3, 2, 1, 2, 1, 1, 0, 0, 1, 3, 2, 4, 6
Offset: 1

Views

Author

V. Raman, Oct 04 2012

Keywords

Comments

Note: For the equation a^2 + b^2 = n, if there are two solutions (a,b) and (b,a), then they will be counted only once.
The sequences A216501 and A216671 give how many of the four k values, k = 1, 2, 3, 7 does the equation a^2 + k*b^2 = n have a solution to.
1, 2, 3, 7 are the first four numbers, with the class number 1.
"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.

References

  • David A. Cox, Primes of the Form x^2 + n y^2, Wiley, 1989.

Crossrefs

Cf. A217868 (related sequence of this when the order does matter for the equation a^2 + b^2 = n).
Cf. A216501 (how many of the four k values, k = 1, 2, 3, 7 does the equation a^2 + k*b^2 = n have a solution to, with a > 0, b > 0).
Cf. A216671 (how many of the four k values, k = 1, 2, 3, 7 does the equation a^2 + k*b^2 = n have a solution to, with a >= 0, b >= 0).
Cf. A000161 (number of solutions to n = a^2+b^2 (when the solutions (a, b) and (b, a) are being counted as the same) with a >= 0, b >= 0).
Cf. A216282 (number of solutions to n = a^2+2*b^2 with a >= 0, b >= 0).
Cf. A119395 (number of solutions to n = a^2+3*b^2 with a >= 0, b >= 0).
Cf. A216512 (number of solutions to n = a^2+7*b^2 with a >= 0, b >= 0).

Programs

  • PARI
    for(n=1,100,sol=0;for(x=0,100,if(issquare(n-x*x)&&n-x*x>=0&&x*x<=n-x*x,sol++);if(issquare(n-2*x*x)&&n-2*x*x>=0,sol++);if(issquare(n-3*x*x)&&n-3*x*x>=0,sol++);if(issquare(n-7*x*x)&&n-7*x*x>=0,sol++));printf(sol","))

A217463 a(n) is the sum of total number of positive integer solutions to each of a^2 + b^2 = n, a^2 + 2*b^2 = n, a^2 + 3*b^2 = n and a^2 + 7*b^2 = n. (Order does not matter for the equation a^2+b^2 = n).

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, 2, 3, 2, 0, 1, 3, 2, 2, 0, 2, 3, 1, 1, 1, 2, 0, 3, 2, 1, 0, 0, 2, 1, 2, 2, 4, 2, 2, 0, 1, 3, 1, 1, 0, 2, 0, 1, 3, 2, 2, 3, 2, 0, 0, 1, 3, 3, 1, 1, 4, 1, 0, 2, 1, 2, 2, 1, 3, 2, 1, 0, 3, 2, 1, 2, 1, 1, 0, 0, 1, 3, 1, 4, 2
Offset: 1

Views

Author

V. Raman, Oct 04 2012

Keywords

Comments

Note: For the equation a^2 + b^2 = n, if there are two solutions (a,b) and (b,a), then they will be counted only once.
The sequences A216501 and A216671 give how many of the four k values, k = 1, 2, 3, 7 does the equation a^2 + k*b^2 = n have a solution to.
1, 2, 3, 7 are the first four numbers, with the class number 1.
"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.

References

  • David A. Cox, Primes of the Form x^2 + n y^2, Wiley, 1989.

Crossrefs

Cf. A217869 (related sequence of this when the order does matter for the equation a^2 + b^2 = n).
Cf. A216501 (how many of the four k values, k = 1, 2, 3, 7 does the equation a^2 + k*b^2 = n have a solution to, with a > 0, b > 0).
Cf. A216671 (how many of the four k values, k = 1, 2, 3, 7 does the equation a^2 + k*b^2 = n have a solution to, with a >= 0, b >= 0).
Cf. A025426 (number of solutions to n = a^2+b^2 (when the solutions (a, b) and (b, a) are being counted as the same) with a > 0, b > 0).
Cf. A216278 (number of solutions to n = a^2+2*b^2 with a > 0, b > 0).
Cf. A092573 (number of solutions to n = a^2+3*b^2 with a > 0, b > 0).
Cf. A216511 (number of solutions to n = a^2+7*b^2 with a > 0, b > 0).

Programs

  • PARI
    for(n=1,100,sol=0;for(x=1,100,if(issquare(n-x*x)&&n-x*x>0&&x*x<=n-x*x,sol++);if(issquare(n-2*x*x)&&n-2*x*x>0,sol++);if(issquare(n-3*x*x)&&n-3*x*x>0,sol++);if(issquare(n-7*x*x)&&n-7*x*x>0,sol++));printf(sol","))

A217868 a(n) is the sum of total number of nonnegative integer solutions to each of a^2 + b^2 = n, a^2 + 2*b^2 = n, a^2 + 3*b^2 = n and a^2 + 7*b^2 = n. (Order matters for the equation a^2+b^2 = n).

Original entry on oeis.org

5, 2, 2, 6, 2, 1, 2, 3, 6, 2, 2, 3, 3, 0, 0, 7, 3, 3, 2, 2, 1, 1, 1, 1, 7, 2, 3, 4, 3, 0, 1, 4, 2, 3, 0, 7, 4, 1, 1, 2, 3, 0, 3, 2, 2, 0, 0, 3, 6, 4, 2, 5, 3, 2, 0, 1, 3, 2, 1, 0, 3, 0, 2, 8, 4, 2, 3, 3, 0, 0, 1, 4, 4, 2, 2, 4, 1, 0, 2, 2, 7, 3, 1, 3, 4, 1, 0, 3, 3, 2, 2, 1, 1, 0, 0, 1, 4, 2, 4, 8
Offset: 1

Views

Author

V. Raman, Oct 13 2012

Keywords

Comments

Note: For the equation a^2 + b^2 = n, if there are two solutions (a,b) and (b,a), then they will be counted separately.
The sequences A216501 and A216671 give how many of the four k values, k = 1, 2, 3, 7 does the equation a^2 + k*b^2 = n have a solution to.
1, 2, 3, 7 are the first four numbers with class number 1.
a(n) = A217462(n) when n is not the sum of two positive squares.
But when n is the sum of two positive squares, the ordered pairs for the equation x^2+y^2 = n count.
For example,
193 = 12^2 + 7^2.
193 = 7^2 + 12^2.
193 = 11^2 + 2*6^2.
193 = 1^2 + 3*8^2.
193 = 9^2 + 7*4^2.
So a(193) = 5. On the other hand, for the sequence A217462, the ordered pairs 12^2 + 7^2, 7^2 + 12^2 will be counted only once, so A217462(193) = 4.

References

  • David A. Cox, Primes of the Form x^2 + n y^2, Wiley, 1989.

Crossrefs

Cf. A217462 (related sequence of this when the order does not matter for the equation a^2 + b^2 = n).
Cf. A216501 (how many of the four k values, k = 1, 2, 3, 7 does the equation a^2 + k*b^2 = n have a solution to, with a > 0, b > 0).
Cf. A216671 (how many of the four k values, k = 1, 2, 3, 7 does the equation a^2 + k*b^2 = n have a solution to, with a >= 0, b >= 0).
Cf. A000925 (number of solutions to n = a^2+b^2 (when the solutions (a, b) and (b, a) are being counted differently) with a >= 0, b >= 0).
Cf. A216282 (number of solutions to n = a^2+2*b^2 with a >= 0, b >= 0).
Cf. A119395 (number of solutions to n = a^2+3*b^2 with a >= 0, b >= 0).
Cf. A216512 (number of solutions to n = a^2+7*b^2 with a >= 0, b >= 0).

Programs

  • PARI
    for(n=1, 100, sol=0; for(x=0, 100, if(issquare(n-x*x)&&n-x*x>=0, sol++); if(issquare(n-2*x*x)&&n-2*x*x>=0, sol++); if(issquare(n-3*x*x)&&n-3*x*x>=0, sol++); if(issquare(n-7*x*x)&&n-7*x*x>=0, sol++)); printf(sol", "))

A217869 a(n) is the sum of total number of positive integer solutions to each of a^2 + b^2 = n, a^2 + 2*b^2 = n, a^2 + 3*b^2 = n and a^2 + 7*b^2 = n. (Order matters for the equation a^2+b^2 = n).

Original entry on oeis.org

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

Views

Author

V. Raman, Oct 13 2012

Keywords

Comments

Note: For the equation a^2 + b^2 = n, if there are two solutions (a,b) and (b,a), then they will be counted separately.
The sequences A216501 and A216671 give how many of the four k values, k = 1, 2, 3, 7 does the equation a^2 + k*b^2 = n have a solution to.
1, 2, 3, 7 are the first four numbers, with the class number 1. a(n) = A217463(n), when n is not the sum of two positive squares.
But when n is the sum of two positive squares, the ordered pairs for the equation x^2+y^2 = n count.
For example,
193 = 12^2 + 7^2.
193 = 7^2 + 12^2.
193 = 11^2 + 2*6^2.
193 = 1^2 + 3*8^2.
193 = 9^2 + 7*4^2.
So, a(193) = 5. On the other hand, for the sequence A217463, the ordered pairs 12^2 + 7^2, 7^2 + 12^2 will be counted only once, so A217463(193) = 4.

References

  • David A. Cox, Primes of the Form x^2 + n y^2, Wiley, 1989.

Crossrefs

Cf. A217463 (related sequence of this when the order does not matter for the equation a^2 + b^2 = n).
Cf. A216501 (how many of the four k values, k = 1, 2, 3, 7 does the equation a^2 + k*b^2 = n have a solution to, with a > 0, b > 0).
Cf. A216671 (how many of the four k values, k = 1, 2, 3, 7 does the equation a^2 + k*b^2 = n have a solution to, with a >= 0, b >= 0).
Cf. A063725 (number of solutions to n = a^2+b^2 (when the solutions (a, b) and (b, a) are being counted differently) with a > 0, b > 0).
Cf. A216278 (number of solutions to n = a^2+2*b^2 with a > 0, b > 0).
Cf. A092573 (number of solutions to n = a^2+3*b^2 with a > 0, b > 0).
Cf. A216511 (number of solutions to n = a^2+7*b^2 with a > 0, b > 0).

Programs

  • PARI
    for(n=1, 100, sol=0; for(x=1, 100, if(issquare(n-x*x)&&n-x*x>0, sol++); if(issquare(n-2*x*x)&&n-2*x*x>0, sol++); if(issquare(n-3*x*x)&&n-3*x*x>0, sol++); if(issquare(n-7*x*x)&&n-7*x*x>0, sol++)); printf(sol", "))

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-7 of 7 results.