OFFSET
1,6
COMMENTS
Conjecture: a(n) > 0 for all n > 1 not divisible by 4.
See also A291635 for a stronger conjecture.
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.
EXAMPLE
a(2) = 1 since 2 = 0^2 + 1^2 + 1^2 + 0^2 with 0 + 2*1 + 5*1 = 7, 7 - 2 = 5 and 7 + 4 = 11 all prime.
a(5) = 1 since 5 = 2^2 + 0^2 + 1^2 + 0^2 with 2 + 2*0 + 5*1 = 7, 7 - 2 = 5 and 7 + 4 = 11 all prime.
a(181) = 1 since 181 = 1^2 + 6^2 + 0^2 + 12^2 with 1 + 2*6 + 5*0 = 13, 13 - 2 = 11 and 13 + 4 = 17 all prime.
a(285) = 1 since 285 = 10^2 + 4^2 + 5^2 + 12^2 with 10 + 2*4 + 5*5 = 43, 43 - 2 = 41 and 43 + 4 = 47 all prime.
MATHEMATICA
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
TQ[p_]:=TQ[p]=PrimeQ[p]&&PrimeQ[p-2]&&PrimeQ[p+4];
Do[r=0; Do[If[SQ[n-x^2-y^2-z^2]&&TQ[x+2y+5z], r=r+1], {x, 0, Sqrt[n]}, {y, 0, Sqrt[n-x^2]}, {z, 0, Sqrt[n-x^2-y^2]}]; Print[n, " ", r], {n, 1, 100}]
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Zhi-Wei Sun, Aug 28 2017
STATUS
approved