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.

A291455 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 x + 3*y + 5*z + 7*w, x^3 + 3*y^3 + 5*z^3 + 7*w^3 and x^7 + 3*y^7 + 5*z^7 + 7*w^7 are all prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Aug 24 2017

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n = 0,1,2,..., and a(n) = 1 only for n = 3, 4, 7, 17, 23, 34, 39, 51, 66, 69, 99, 109, 115, 171, 191. Also, any integer n > 1 with gcd(n,42) = 1 can be written as x + 3*y + 5*z + 7*w with x,y,z,w nonnegative integers such that x^3 + 3*y^3 + 5*z^3 + 7*w^3 and x^7 + 3*y^7 + 5*z^7 + 7*w^7 are both prime.
(ii) 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 x + 5*y + 9*z + 11*w, x^3 + 5*y^3 + 9*z^3 + 11*w^3 and x^5 + 5*y^5 + 9*z^5 + 11*w^5 are all prime. Also, any integer n > 1 with gcd(n,30) = 1 can be written as x + 5*y + 9*z + 11*w with x,y,z,w nonnegative integers such that x^3 + 5*y^3 + 9*z^3 + 11*w^3 and x^5 + 5*y^5 + 9*z^5 + 11*w^5 are both prime.
(iii) Let (k,m) be one of the ordered pairs (1,2), (1,4), (1,5), (1,9), (2,6), (3,5), (8,8). Then 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 x^k + 3*y^k + 5*z^k + 7*w^k and x^m + 3*y^m + 5*z^m + 7*w^m are both prime.
(iv) 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 = x + 3*y + 5*z + 7*w and 2*p+1 (or p-4) are both prime.
(v) For each m = 1, 2, 4, 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 = x^m + 3*y^m + 5*z^m + 7*w^m and p+6 are both prime.
See also A290935 for a similar conjecture involving twin primes.

Examples

			a(4) = 1 since 2*4+1 = 0^2 + 2^2 + 2^2 + 1^2 with 0 + 3*2 + 5*2 + 7*1 = 23, 0^3 + 3*2^3 + 5*2^3 + 7*1^3 = 71 and 0^7 + 3*2^7 + 5*2^7 + 7*1^7 = 1031 all prime.
a(34) = 1 since 2*34+1 = 2^2 + 0^2 + 4^2 + 7^2 with 2 + 3*0 + 5*4 + 7*7 = 71, 2^3 + 3*0^3 + 5*4^3 + 7*7^3 = 2729 and 2^7 + 3*0^7 + 5*4^7 + 7*7^7 = 5846849 all prime.
a(66) = 1 since 2*66+1 = 4^2 + 6^2 + 9^2 + 0^2 with 4 + 3*6 + 5*9 + 7*0 = 67, 4^3 + 3*6^3 + 5*9^3 + 7*0^3 = 4357 and 4^7 + 3*6^7 + 5*9^7 + 7*0^7 = 24771037 all prime.
a(69) = 1 since 2*69+1 = 11^2 + 3^2 + 0^2 + 3^2 with 11 + 3*3 + 5*0 + 7*3 = 41, 11^3 + 3*3^3 + 5*0^3 + 7*3^3 = 1601 and 11^7 + 3*3^7 + 5*0^7 + 7*3^7 = 19509041 all prime.
a(191) = 1 since 2*191+1 = 11^2 + 6^2 + 1^2 + 15^2 with 11 + 3*6 + 5*1 + 7*15 = 139, 11^3 + 3*6^3 + 5*1^3 + 7*15^3 = 25609 and 11^7 + 3*6^7 + 5*1^7 + 7*15^7 = 1216342609 all prime.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    f[m_,x_,y_,z_,w_]:=f[m,x,y,z,w]=x^m+3y^m+5z^m+7w^m;
    Do[r=0;Do[If[SQ[2n+1-x^2-y^2-z^2]&&PrimeQ[f[1,x,y,z,Sqrt[2n+1-x^2-y^2-z^2]]]&&PrimeQ[f[3,x,y,z,Sqrt[2n+1-x^2-y^2-z^2]]]&&PrimeQ[f[7,x,y,z,Sqrt[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,100}]