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.

A290935 Number of ways to write 2*n+1 as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that p = x^2 + 3*y^2 + 5*z^2 + 7*w^2 and p - 2 are twin prime.

Original entry on oeis.org

2, 1, 4, 2, 1, 1, 4, 2, 2, 6, 2, 1, 6, 1, 2, 8, 5, 3, 7, 1, 4, 10, 3, 2, 9, 4, 8, 7, 5, 5, 11, 4, 7, 8, 4, 3, 10, 5, 6, 10, 7, 4, 16, 4, 9, 10, 2, 3, 11, 7, 5, 8, 3, 7, 13, 4, 4, 16, 2, 6, 15, 1, 4, 10, 6, 6, 13, 7, 2, 13, 8, 9, 15, 4, 12, 8, 7, 5, 7, 2, 9
Offset: 0

Views

Author

Zhi-Wei Sun, Aug 23 2017

Keywords

Comments

Conjecture: a(n) > 0 for all n = 0,1,2,..., and a(n) = 1 only for n = 1, 4, 5, 11, 13, 19, 61.
This refinement of Lagrange's four-square theorem implies the twin prime conjecture.
Below we list some similar conjectures:
(i) 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 p = 3*x^2 + 5*y^2 + 11*z^2 + 13*w^2 and p + 2 are twin prime.
(ii) Each positive odd integer can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that p = x + y + 3*z + 5*w and p + 2 (or p - 2) are twin prime.
(iii) Any positive odd integer can be can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that x^3 + y^3 + z^3 + 3*w^3 is prime.
(iv) For each m = 1,2,3, any positive integer not divisible by 4 can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that x^m + 2*y^m + 3*z^m + 4*w^m is prime.
(v) Let n be any positive integer not divisible by 4. Then we can write n as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that 2*x^4 + 3*y^4 + 4*z^4 + 5*w^4 is prime. Also, we can write n as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that 3*x^5 + 4*y^5 + 5*z^6 + 6*w^5 is prime.

Examples

			a(0) = 2 since 2*0+1 = 0^2 + 0^2 + 1^2 + 0^2 with 0^2 + 3*0^2 + 5*1^2 + 7*0^2 = 5 and 5 - 2 = 3 twin prime, and 2*0+1 = 0^2 + 0^2 + 0^2 + 1^2 with 0^2 + 3*0^2 + 5*0^2 + 7*1^2 = 7 and 7 - 2 = 5 prime.
a(1) = 1 since 2*1+1 = 1^2 + 0^2 + 1^2 + 1^2 with 1^2 + 3*0^2 + 5*1^2 + 7*1^2 = 13 and 13 - 2 = 11 twin prime.
a(4) = 1 since 2*4+1 = 2^2 + 0^2 + 2^2 + 1^2 with 2^2 + 3*0^2 + 5*2^2 + 7*1^2 = 31 and 31 - 2 = 29 twin prime.
a(5) = 1 since 2*5+1 = 3^2 + 1^2 + 0^2 + 1^2 with 3^2 + 3*1^2 + 5*0^2 + 7*1^2 = 19 and 19 - 2 twin prime.
a(11) = 1 since 2*11+1 = 3^2 + 2^2 + 3^2 + 1^2 with 3^2 + 3*2^2 + 5*3^2 + 7*1^2 = 73 and 73 - 2 = 71 twin prime.
a(13) = 1 since 2*13+1 = 1^2 + 0^2 + 1^2 + 5^2 with 1^2 + 3*0^2 + 5*1^2 + 7*5^2 = 181 and 181 - 2 = 179 twin prime.
a(19) = 1 since 2*19+1 = 1^2 + 3^2 + 5^2 + 2^2 with 1^2 + 3*3^2 + 5*5^2 + 7*2^2 = 181 and 181 - 2 = 179 twin prime.
a(61) = 1 since 2*61+1 = 7^2 + 3^2 + 7^2 + 4^2 with 7^2 + 3*3^2 + 5*7^2 + 7*4^2 = 433 and 433 - 2 = 431 twin prime.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    TQ[p_]:=TQ[p]=PrimeQ[p]&&PrimeQ[p-2];
    Do[r=0;Do[If[SQ[2n+1-x^2-y^2-z^2]&&TQ[x^2+3y^2+5z^2+7(2n+1-x^2-y^2-z^2)],r=r+1],{x,0,Sqrt[2n+1]},{y,0,Sqrt[2n+1-x^2]},{z,0,Sqrt[2n+1-x^2-y^2]}];Print[n," ",r],{n,0,80}]