login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A338019
Number of ways to write n as x^2 + y^2 + z^2 + w^2 with 3*x + 10*y + 36*z a positive square, where x, y, z, w are nonnegative integers.
2
1, 1, 1, 1, 2, 1, 1, 0, 2, 2, 1, 2, 3, 3, 1, 1, 4, 1, 1, 2, 1, 3, 1, 0, 3, 4, 2, 1, 4, 4, 2, 1, 1, 3, 2, 2, 1, 5, 4, 0, 4, 4, 1, 1, 4, 3, 3, 1, 4, 3, 3, 4, 1, 4, 1, 2, 3, 3, 1, 4, 3, 3, 2, 1, 4, 2, 2, 2, 1, 1, 2, 1, 2, 3, 5, 1, 5, 5, 3, 2, 6, 4, 1, 6, 3, 5, 3, 1, 3, 7, 2, 2, 2, 7, 3, 1, 4, 1, 2, 2
OFFSET
1,5
COMMENTS
Conjecture: a(n) > 0 if n is not divisible by 8. Moreover, a(n) = 0 if and only if n has the form 2^(4k+3)*m (k >= 0 and m = 1, 3, 5, 61).
We have verified this for n up to 5*10^6. See also A335624 for a similar conjecture.
LINKS
Zhi-Wei Sun, Refining Lagrange's four-square theorem, J. Number Theory 175(2017), 167-190. See also arXiv:1604.06723 [math.NT].
Zhi-Wei Sun, Sums of four squares with certain restrictions, arXiv:2010.05775 [math.NT], 2020.
EXAMPLE
a(21) = 1, and 21 = 2^2 + 1^2 + 0^2 + 4^2 with 3*2 + 10*1 + 36*0 = 4^2.
a(98) = 1, and 98 = 6^2 + 7^2 + 3^2 + 2^2 with 3*6 + 10*7 + 36*3 = 14^2.
a(203) = 1, and 203 = 5^2 + 3^2 + 5^2 + 12^2 with 3*5 + 10*3 + 36*5 = 15^2.
a(760) = 1, and 760 = 0^2 + 18^2 + 20^2 + 6^2 with 3*0 + 10*18 + 36*20 = 30^2.
MATHEMATICA
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
TQ[n_]:=TQ[n]=n>0&&SQ[n];
tab={}; Do[r=0; Do[If[SQ[n-x^2-y^2-z^2]&&TQ[3x+10y+36z], r=r+1], {x, 0, Sqrt[n]}, {y, 0, Sqrt[n-x^2]}, {z, 0, Sqrt[n-x^2-y^2]}];
tab=Append[tab, r], {n, 1, 100}]; Print[tab]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Oct 08 2020
STATUS
approved