login
Number of ways to write n as w^4 + x^2 + y^2 + z^2, where w, x, y and z are nonnegative integers with x <= y <= z.
30

%I #17 Mar 27 2016 10:20:45

%S 1,2,2,2,2,2,2,1,1,3,3,2,2,2,2,1,2,4,5,4,3,3,3,1,2,5,5,5,3,3,4,1,2,5,

%T 6,4,4,4,4,2,2,6,6,4,2,5,4,1,2,5,7,6,5,4,7,3,2,6,4,4,3,4,5,2,2,6,9,6,

%U 4,6,6,1,3,6,6,7,3,5,5,1,2

%N Number of ways to write n as w^4 + x^2 + y^2 + z^2, where w, x, y and z are nonnegative integers with x <= y <= z.

%C Theorem: a(n) > 0 for all n = 0,1,2,.... In other words, any nonnegative integer can be written as the sum of a fourth power and three squares.

%C This is stronger than Lagrange's four-square theorem, and it can be proved by induction on n. It is easy to check that a(n) > 0 for all n = 0..16. Now let n be an integer greater than 16, and assume that a(m) > 0 for all m = 0..n-1. If 16|n, then n/16 can be written as w^4+x^2+y^2+z^2 with w,x,y,z integers, and hence n = (2w)^4+(4x)^2+(4y)^2+(4z)^2. If n == 8 (mod 16), then n is not of the form 4^k*(8q+7) and hence n = 0^4+x^2+y^2+z^2 for some integers x,y,z. If n == 4 (mod 8), then n-1^4 can be written as the sum of three squares. If n == 2 (mod 4), then n-0^4 is a sum of three squares. If n == 7 (mod 8), then n-1^4 can be written as the sum of three squares. If n is odd but not congruent to 7 modulo 8, then n-0^4 can be expressed as the sum of three squares.

%C We have a(n) = 1 if n has the form 16^k*q with k a nonnegative integer and q among 7, 8, 15, 23, 31, 47, 71, 79. In fact, if n = 16*m with m > 0, and 16*m = w^4+x^2+y^2+z^2 with w,x,y,z integers, then w,x,y,z are all even and hence m = (w/2)^4+(x/2)^2+(y/2)^2+(z/2)^2. Therefore a(16*m) = a(m) for all m > 0. It is easy to check that a(q) = 1 for every q = 7, 8, 15, 23, 31, 47, 71, 79.

%C For (a,b,c) = (1,1,2),(1,1,3),(1,1,4),(1,1,6),(1,2,2),(1,2,3),(1,2,4),(1,2,5), we are also able to show that any natural number can be written as w^4+a*x^2+b*y^2+c*z^2 with w,x,y,z integers.

%C Conjecture: For each triple (a,b,c) = (1,2,11),(1,2,12),(1,2,13),(2,3,5), any natural number can be written as w^4+a*x^2+b*y^2+c*z^2 with w,x,y,z integers.

%H Zhi-Wei Sun, <a href="/A270969/b270969.txt">Table of n, a(n) for n = 0..10000</a>

%H Zhi-Wei Sun, <a href="http://dx.doi.org/10.1016/j.jnt.2015.10.014">A result similar to Lagrange's theorem</a>, J. Number Theory 162(2016), 190-211.

%e a(7) = 1 since 7 = 1^4 + 1^2 + 1^2 + 2^2.

%e a(8) = 1 since 8 = 0^4 + 0^2 + 2^2 + 2^2.

%e a(15) = 1 since 15 = 1^4 + 1^2 + 2^2 + 3^2.

%e a(23) = 1 since 23 = 1^4 + 2^2 + 3^2 + 3^2.

%e a(31) = 1 since 31 = 1^4 + 1^2 + 2^2 + 5^2.

%e a(47) = 1 since 47 = 1^4 + 1^2 + 3^2 + 6^2.

%e a(71) = 1 since 71 = 1^4 + 3^2 + 5^2 + 6^2.

%e a(79) = 1 since 79 = 1^4 + 2^2 + 5^2 + 7^2.

%t SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]

%t Do[r=0;Do[If[SQ[n-w^4-x^2-y^2],r=r+1],{w,0,n^(1/4)},{x,0,Sqrt[(n-w^4)/3]},{y,x,Sqrt[(n-w^4-x^2)/2]}];Print[n," ",r];Continue,{n,0,80}]

%Y Cf. A000290, A000583, A262827, A270516, A270533, A270559, A270566.

%K nonn

%O 0,2

%A _Zhi-Wei Sun_, Mar 27 2016