A254573 Number of ways to write n = x*(x+1) + y*(3*y+1)/2 + z*(3*z-1)/2 with x,y,z nonnegative integers.
1, 1, 2, 2, 1, 2, 1, 4, 2, 3, 1, 1, 3, 3, 5, 2, 2, 2, 3, 3, 4, 3, 4, 1, 4, 2, 4, 5, 4, 3, 2, 4, 5, 4, 2, 4, 2, 6, 3, 5, 3, 3, 6, 5, 5, 3, 3, 6, 2, 6, 5, 3, 4, 3, 6, 2, 4, 9, 6, 4, 4, 5, 5, 5, 7, 3, 2, 3, 8, 4, 6
Offset: 0
Keywords
Examples
a(10) = 1 since 10 = 1*2 + 2*(3*2+1)/2 + 1*(3*1-1)/2. a(11) = 1 since 11 = 2*3 + 0*(3*0+1)/2 + 2*(3*2-1)/2. a(23) = 1 since 23 = 4*5 + 1*(3*1+1)/2 + 1*(3*1-1)/2. a(34) = 2 since 34 = 3*4 + 0*(3*0+1)/2 + 4*(3*4-1)/2 = 4*5 + 1*(3*1+1)/2 + 3*(3*3-1)/2.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 0..10000
- Zhi-Wei Sun, On universal sums of polygonal numbers, arXiv:0905.0635 [math.NT], 2009-2015.
Programs
-
Mathematica
sQ[n_]:=IntegerQ[Sqrt[4n+1]] Do[r=0;Do[If[sQ[n-y(3y+1)/2-z(3z-1)/2],r=r+1],{y,0,(Sqrt[24n+1]-1)/6},{z,0,(Sqrt[24(n-y(3y+1)/2)+1]+1)/6}]; Print[n," ",r];Continue,{n,0,70}]
Comments