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.
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
Keywords
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.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 0..10000
- Zhi-Wei Sun, Refining Lagrange's four-square theorem, J. Number Theory 175(2017), 167-190.
- Zhi-Wei Sun, Restricted sums of four squares, arXiv:1701.05868 [math.NT], 2017.
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}]
Comments