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.

A291191 Number of ways to write 2*n+1 as x^2 + y^2 + z^2 + w^2, where x,y,z,w are nonnegative integers with x <= y, z <= w and x + y < z + w such that 2^(x+y) + 2^(z+w) + 1 is prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Aug 20 2017

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 1, 2, 3, 6, 7, 11, 12, 16, 19, 20, 23, 26, 63, 75, 98.
(ii) Any integer n > 1 can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that 2^(x+y) + 2^(z+w) is a practical number (A005153).
(iii) Any positive odd integer can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that 2^(x+y) + 3^(z+w) is prime.
(iv) Any positive integer not divisible by 32 can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that 2^x + 3^y + 4^z is prime.
See also A291150 for a similar conjecture.
I have verified that a(n) > 0 for all n = 1..10^7. For example, a(6998538) > 0 since 2*6998538+1 = 122^2 + 220^2 + 208^2 + 3727^2 with 2^(122+220) + 2^(208+3727) + 1 = 2^342 + 2^3935 + 1 a prime of 1185 decimal digits. - Zhi-Wei Sun, Aug 23 2017

Examples

			a(1) = 1 since 2*1+1 = 0^2 + 1^2 + 1^2 + 1^2 with 2^(0+1) + 2^(1+1) + 1 = 7 prime.
a(2) = 1 since 2*2+1 = 0^2 + 1^2 + 0^2 + 2^2 with 2^(0+1) + 2^(0+2) + 1 = 7 prime.
a(19) = 1 since 2*19+1 = 2^2 + 3^2 + 1^2 + 5^2 with 2^(2+3) + 2^(1+5) + 1 = 97 prime.
a(26) = 1 since 2*26+1 = 1^2 + 4^2 + 0^2 + 6^2 with 2^(1+4) + 2^(0+6) + 1 = 97 prime.
a(63) = 1 since 2*63+1 = 1^2 + 5^2 + 1^2 +10^2 with 2^(1+5) + 2^(1+10) + 1 = 2113 prime.
a(75) = 1 since 2*75+1 = 1^2 + 5^2 + 5^2 + 10^2 with 2^(1+5) + 2^(5+10) + 1 = 32833 prime.
a(98) = 1 since 2*98+1 = 6^2 + 6^2 + 2^2 + 11^2 with 2^(6+6) + 2^(2+11) + 1 = 12289 prime.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    Do[r=0;Do[If[SQ[2n+1-x^2-y^2-z^2]&&x+y