A306690 Number of ways to write n as u^4 + (v*(v+1)/2)^2 + (x*(3x+1)/2)^2 + (y*(5y+1)/2)^2 + (z*(9z+1)/2)^2, where u and v are nonnegative integers and x,y,z are integers.
1, 3, 3, 1, 2, 5, 4, 1, 1, 4, 6, 4, 1, 3, 5, 2, 2, 6, 6, 3, 5, 8, 6, 2, 2, 9, 14, 9, 2, 9, 14, 7, 2, 5, 10, 12, 9, 6, 8, 7, 5, 9, 10, 6, 4, 10, 10, 4, 1, 4, 12, 11, 5, 4, 10, 6, 5, 5, 5, 8, 8, 7, 8, 5, 1, 7, 11, 5, 3, 5, 8, 5, 3, 1, 6, 10, 4, 4, 6, 4, 1, 8, 8, 8, 6, 7, 11, 6, 1, 2, 10, 8, 3, 2, 7, 6, 1, 4, 8, 9, 4
Offset: 0
Keywords
Examples
a(8) = 1 with 8 = 0^4 + (0*(0+1)/2)^2 + (1*(3*1+1)/2)^2 + ((-1)*(5*(-1)+1)/2)^2 + (0*(9*0+1)/2)^2. a(2953) = 1 with 2953 = 6^4 + (8*(8+1)/2)^2 + (0*(3*0+1)/2)^2 + (0*(5*0+1)/2)^2 + (2*(9*2+1)/2)^2. a(8953) = 1 with 8953 = 2^4 + (7*(7+1)/2)^2 + (6*(3*6+1)/2)^2 + ((-1)*(5*(-1)+1)/2)^2 + ((-4)*(9*(-4)+1)/2)^2.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 0..10000
Programs
-
Mathematica
t[x_]:=t[x]=(x(x+1)/2)^2; f[x_]:=f[x]=(x(5x+1)/2)^2; g[x_]:=g[x]=(x(9x+1)/2)^2; SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]; PQ[n_]:=PQ[n]=SQ[n]&&SQ[24*Sqrt[n]+1]; tab={};Do[r=0;Do[If[PQ[n-k^4-t[x]-f[y]-g[z]],r=r+1],{k,0,n^(1/4)},{x,0,(Sqrt[8*Sqrt[n-k^4]+1]-1)/2},{y,-Floor[(Sqrt[40*Sqrt[n-k^4-t[x]]+1]+1)/10],(Sqrt[40*Sqrt[n-k^4-t[x]]+1]-1)/10},{z,-Floor[(Sqrt[72*Sqrt[n-k^4-t[x]-f[y]]+1]+1)/18],(Sqrt[72*Sqrt[n-k^4-t[x]-f[y]]+1]-1)/18}];tab=Append[tab,r],{n,0,100}];Print[tab]
Comments