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.
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
Keywords
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.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..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.
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
Comments