A254629 Number of ways to write n as x^2 + y*(y+1) + z*(4*z+1) with x,y,z nonnegative integers.
1, 1, 1, 1, 1, 1, 3, 2, 1, 2, 1, 3, 2, 1, 1, 2, 3, 1, 3, 1, 3, 5, 2, 1, 3, 3, 2, 3, 2, 3, 3, 3, 1, 2, 4, 1, 5, 1, 2, 5, 2, 3, 5, 4, 1, 4, 4, 3, 4, 4, 2, 5, 2, 1, 4, 5, 5, 3, 1, 1, 7, 5, 1, 3, 4, 2, 5, 3, 2, 6, 5, 3, 4, 4, 5, 5, 4, 4, 5, 3, 1, 8, 2, 4, 7, 3, 4, 3, 5, 3, 6, 3, 3, 3, 6, 4, 5, 5, 2, 9, 2
Offset: 0
Keywords
Examples
a(103) = 1 since 103 = 8^2 + 0*1 + 3*(4*3+1). a(122) = 1 since 122 = 9^2 + 1*2 +3*(4*3+1). a(143) = 1 since 143 = 6^2 + 1*2 + 5*(4*5+1). a(167) = 1 since 167 = 3^2 + 9*10 + 4*(4*4+1). a(248) = 1 since 248 = 5^2 + 4*5 + 7*(4*7+1). a(338) = 1 since 338 = 5^2 + 10*11 + 7*(4*7+1).
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[n]] Do[r=0;Do[If[SQ[n-y(y+1)-z*(4z+1)],r=r+1],{y,0,(Sqrt[4n+1]-1)/2},{z,0,(Sqrt[16(n-y(y+1))+1]-1)/8}]; Print[n," ",r];Continue,{n,0,100}]
Comments