A270969 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.
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, 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, 4, 6, 6, 1, 3, 6, 6, 7, 3, 5, 5, 1, 2
Offset: 0
Keywords
Examples
a(7) = 1 since 7 = 1^4 + 1^2 + 1^2 + 2^2. a(8) = 1 since 8 = 0^4 + 0^2 + 2^2 + 2^2. a(15) = 1 since 15 = 1^4 + 1^2 + 2^2 + 3^2. a(23) = 1 since 23 = 1^4 + 2^2 + 3^2 + 3^2. a(31) = 1 since 31 = 1^4 + 1^2 + 2^2 + 5^2. a(47) = 1 since 47 = 1^4 + 1^2 + 3^2 + 6^2. a(71) = 1 since 71 = 1^4 + 3^2 + 5^2 + 6^2. a(79) = 1 since 79 = 1^4 + 2^2 + 5^2 + 7^2.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 0..10000
- Zhi-Wei Sun, A result similar to Lagrange's theorem, J. Number Theory 162(2016), 190-211.
Programs
-
Mathematica
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]] 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}]
Comments