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