A262815 Number of ordered ways to write n as x^3 + y*(y+1)/2 + z*(3*z+1)/2, where x, y and z are nonnegative integers.
1, 2, 2, 3, 2, 1, 2, 2, 4, 3, 3, 4, 1, 3, 2, 3, 5, 3, 5, 1, 1, 3, 3, 4, 2, 3, 3, 3, 4, 6, 6, 3, 2, 3, 2, 4, 6, 6, 3, 2, 3, 3, 4, 5, 8, 2, 3, 3, 5, 3, 2, 5, 3, 3, 3, 7, 3, 4, 4, 3, 3, 3, 5, 8, 2, 4, 3, 5, 7, 4, 7, 4, 5, 3, 6, 1, 4, 4, 6, 7, 4, 8, 5, 1, 4, 7, 7, 4, 4, 5, 2, 3, 5, 10, 6, 4, 2, 1, 3, 5, 7
Offset: 0
Keywords
Examples
a(0) = 1 since 0 = 0^3 + 0*1/2 + 0*(3*0+1)/2. a(5) = 1 since 5 = 0^3 + 2*3/2 + 1*(3*1+1)/2. a(12) = 1 since 12 = 0^3 + 4*5/2 + 1*(3*1+1)/2. a(19) = 1 since 19 = 1^3 + 2*3/2 + 3*(3*3+1)/2. a(20) = 1 since 20 = 2^3 + 4*5/2 + 1*(3*1+1)/2. a(75) = 1 since 75 = 2^3 + 4*5/2 + 6*(3*6+1)/2. a(83) = 1 since 83 = 0^3 + 3*4/2 + 7*(3*7+1)/2. a(97) = 1 since 97 = 3^3 + 10*11/2 + 3*(3*3+1)/2. a(117) = 1 since 117 = 0^3 + 13*14/2 + 4*(3*4+1)/2.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 0..10000
- Zhi-Wei Sun, On universal sums of polygonal numbers, Sci. China Math. 58(2015), no. 7, 1367-1396.
Programs
-
Mathematica
TQ[n_]:=IntegerQ[Sqrt[8n+1]] Do[r=0;Do[If[TQ[n-x^3-z(3z+1)/2],r=r+1],{x,0,n^(1/3)},{z,0,(Sqrt[24(n-x^3)+1]-1)/6}];Print[n," ",r];Continue,{n,0,100}]
Comments