OFFSET
0,2
COMMENTS
Let c be 1 or 4. Then any nonnegative integer n can be written as c*w^5 + x^2 + y^2 + z^2 with w,x,y,z nonnegative integers. We now prove this by induction on n. For n < 2^(10) this can be verified directly via a computer. If 2^(10) divides n, then by the induction hypothesis we can write n/2^(10) as c*w^5 + x^2 + y^2 + z^2 with w,x,y,z, nonnegative integers, and hence n = c*(2^2*w)^5 + (2^5*x)^2 + (2^5*y)^2 + (2^5*z)^2. If n is not of the form 4^k*(8m+7) with k and m nonnegative integers, then n is the sum of three squares and hence n = c*0^5 + x^2 + y^2 + z^2 for some integers x,y,z. When n = 4^k*(8m+7) > 2^(10) with k < 5, it is easy to see that n - c*1^5 or n - c*2^5 is the sum of three squares.
For any positive integer k and for each c = 2, 6, any natural number n can be written as c*w^k + x^2 + y^2 + z^2 with w,x,y,z nonnegative integers. In fact, for every n = 0,1,2,... either n - c*0^k or n - c*1^k can be written as the sum of three squares.
For some conjectural refinements of Lagrange's four-square theorem, one may consult the author's preprint arXiv:1604.06723
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 0..10000
Zhi-Wei Sun, Refining Lagrange's four-square theorem, arXiv:1604.06723 [math.NT], 2016-2017.
Zhi-Wei Sun, Refining Lagrange's four-square theorem, J. Number Theory 175(2017), 167-190.
EXAMPLE
a(0) = 1 since 0 = 0^5 + 0^2 + 0^2 + 0^2.
a(7) = 1 since 7 = 1^5 + 1^2 + 1^2 + 2^2.
a(8) = 1 since 8 = 0^5 + 0^2 + 2^2 + 2^2.
a(15) = 1 since 15 = 1^5 + 1^2 + 2^2 + 3^2.
a(16) = 1 since 16 = 0^5 + 0^2 + 0^2 + 4^2.
a(23) = 1 since 23 = 1^5 + 2^2 + 3^2 + 3^2.
a(24) = 1 since 24 = 0^2 + 2^2 + 2^2 + 4^2.
a(31) = 1 since 31 = 1^5 + 1^2 + 2^2 + 5^2.
a(47) = 1 since 47 = 1^5 + 1^2 + 3^2 + 6^2.
a(71) = 1 since 71 = 1^5 + 3^2 + 5^2 + 6^2.
a(79) = 1 since 79 = 1^5 + 2^2 + 5^2 + 7^2.
a(92) = 1 since 92 = 1^5 + 1^2 + 3^2 + 9^2.
a(112) = 1 since 112 = 2^5 + 0^2 + 4^2 + 8^2.
a(143) = 1 since 143 = 1^5 + 5^2 + 6^2 + 9^2.
a(191) = 1 since 191 = 1^5 + 3^2 + 9^2 + 10^2.
a(240) = 1 since 240 = 2^5 + 0^2 + 8^2 + 12^2.
MATHEMATICA
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
Do[r=0; Do[If[SQ[n-w^5-x^2-y^2], r=r+1], {w, 0, n^(1/5)}, {x, 0, Sqrt[(n-w^5)/3]}, {y, x, Sqrt[(n-w^5-x^2)/2]}]; Print[n, " ", r]; Label[aa]; Continue, {n, 0, 80}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Jun 03 2016
STATUS
approved