OFFSET
1,5
COMMENTS
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-2018.
EXAMPLE
a(2) = 1 since 2 = 1^2 + 0^2 + 0^2 + 1^2 with 1 + 23*0 = 1^3.
a(4) = 1 since 4 = 2^2 + 0^2 + 0^2 + 0^2 with 2^2 + 23*0 = 2^2*1^3.
a(7) = 1 since 7 = 2^2 + 1^2 + 1^2 + 1^2 with 2^2 + 23*1^2 = 3^3.
a(48) = 2 since 48 = 4^2 + 0^2 + 4^2 + 4^2 = 6^2 + 2^2 + 2^2 + 2^2 with 4^2 + 23*0^2 = 2*2^3 and 6^2 + 23*2^2 = 2*4^3.
a(115) = 1 since 115 = 3^2 + 3^2 + 4^2 + 9^2 with 3^2 + 23*3^2 = 6^3.
a(267) = 1 since 267 = 3^2 + 1^2 + 1^2 + 16^2 with 3^2 + 23*1^2 = 2^2*2^3.
a(1151) = 1 since 1151 = 7^2 + 3^2 + 2^2 + 33^2 with 7^2 + 23*3^2 = 2^2*4^3.
a(1367) = 1 since 1367 = 17^2 + 5^2 + 18^2 + 27^2 with 17^2 + 23*5^2 = 2^2*6^3.
MATHEMATICA
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
CQ[n_]:=CQ[n]=IntegerQ[n^(1/3)];
QQ[n_]:=n>0&&(CQ[n]||CQ[n/2]||CQ[n/4]);
tab={}; Do[r=0; Do[If[QQ[x^2+23y^2], Do[If[SQ[n-x^2-y^2-z^2], r=r+1], {z, 0, Sqrt[(n-x^2-y^2)/2]}]], {y, 0, Sqrt[n/2]}, {x, y, Sqrt[n-y^2]}]; tab=Append[tab, r], {n, 1, 80}]; Print[tab]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Mar 17 2018
STATUS
approved