OFFSET
1,2
COMMENTS
Conjecture: The sequence has exactly 124 terms as listed in the b-file with 10839 the last one.
See also the related sequence A338095.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..124
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, Restricted sums of four squares, Int. J. Number Theory 15(2019), 1863-1893. See also arXiv:1701.05868 [math.NT].
Zhi-Wei Sun, Sums of four squares with certain restrictions, arXiv:2010.05775 [math.NT], 2020.
EXAMPLE
a(1) = 1, for, if x, y, z, w are nonnegative integers with x^2 + y^2 + z^2 + w^2 = 1 then x + y + 2*z < 4.
MATHEMATICA
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
FQ[n_]:=FQ[n]=n>1&&IntegerQ[Log[4, n]];
tab={}; Do[If[Mod[m, 8]==0||Mod[m, 8]==2, Goto[aa]]; Do[If[SQ[m-x^2-y^2-z^2]&&FQ[x+y+2z], Goto[aa]], {x, 0, Sqrt[m/2]}, {y, x, Sqrt[m-x^2]}, {z, 0, Sqrt[m-x^2-y^2]}]; tab=Append[tab, m]; Label[aa], {m, 1, 660}]; tab
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Oct 10 2020
STATUS
approved