A306240 Number of ways to write n as x^9 + y^3 + z*(z+1) + w*(w+1), where x,y,z,w are nonnegative integers with x <= 2 and z <= w.
1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 2, 1, 3, 5, 4, 3, 2, 1, 1, 2, 4, 4, 3, 3, 2, 2, 3, 4, 3, 2, 3, 4, 5, 6, 4, 2, 2, 2, 2, 3, 5, 5, 4, 4, 4, 4, 2, 1, 3, 4, 5, 5, 3, 2, 2, 2, 3, 4, 4, 5, 4, 2, 4, 6, 5, 2, 2, 3, 4, 6, 6, 4, 4, 5, 3, 3, 6, 6, 4, 3, 3, 3, 3, 3, 5, 7, 6, 5, 3, 3, 4, 3, 5, 6, 4, 3, 4, 4, 3, 5, 6
Offset: 0
Keywords
Examples
a(11) = 1 with 11 = 1^9 + 2^3 + 0*1 + 1*2. a(18) = 1 with 18 = 0^9 + 0^3 + 2*3 + 3*4. a(109) = 1 with 109 = 1^9 + 4^3 + 1*2 + 6*7. a(234) = 1 with 234 = 0^9 + 6^3 + 2*3 + 3*4. a(359) = 1 with 359 = 1^9 + 2^3 + 10*11 + 15*16. a(1978) = 3 with 1978 = 2^9 + 2^3 + 26*27 + 27*28 = 2^9 + 6^3 + 19*20 + 29*30 = 2^9 + 6^3 + 24*25 + 25*26.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 0..10000
Crossrefs
Programs
-
Mathematica
TQ[n_]:=TQ[n]=IntegerQ[Sqrt[4n+1]]; tab={};Do[r=0;Do[If[TQ[n-x^9-y^3-z(z+1)],r=r+1],{x,0,Min[2,n^(1/9)]},{y,0,(n-x^9)^(1/3)},{z,0,(Sqrt[2(n-x^9-y^3)+1]-1)/2}];tab=Append[tab,r],{n,0,100}];Print[tab]
Comments