A275824 Number of ways to write n as pen(x) + pen(y) + pen (z) + 2*pen(w), where x,y,z,w are nonnegative integers with x <= y <= z, and pen(k) denotes the pentagonal number k*(3*k-1)/2.
1, 1, 2, 2, 1, 2, 1, 2, 1, 1, 2, 2, 3, 3, 2, 3, 2, 3, 1, 1, 2, 1, 3, 2, 6, 4, 3, 4, 2, 3, 2, 2, 3, 1, 5, 4, 4, 5, 4, 4, 1, 3, 3, 1, 3, 5, 7, 6, 4, 5, 3, 5, 3, 3, 4, 4, 5, 4, 6, 7, 3, 5, 4, 4, 3, 2, 6, 3, 6, 5, 5, 7, 7, 7, 3, 6, 7, 5, 4, 4, 9
Offset: 0
Keywords
Examples
a(4) = 1 since 4 = 0*(3*0-1)/2 + 1*(3*1-1)/2 + 1*(3*1-1)/2 + 1*(3*1-1). a(18) = 1 since 18 = 1*(3*1-1)/2 + 2*(3*2-1)/2 + 3*(3*3-1)/2 + 0*(3*0-1). a(19) = 1 since 19 = 0*(3*0-1)/2 + 2*(3*2-1)/2 + 3*(3*3-1)/2 + 1*(3*1-1). a(21) = 1 since 21 = 1*(3*1-1)/2 + 2*(3*2-1)/2 + 2*(3*2-1)/2 + 2*(3*2-1). a(33) = 1 since 33 = 0*(3*0-1)/2 + 1*(3*1-1)/2 + 4*(3*4-1)/2 + 2*(3*2-1). a(40) = 1 since 40 = 0*(3*0-1)/2 + 2*(3*2-1)/2 + 5*(3*5-1)/2 + 0*(3*0-1). a(43) = 1 since n = 1*(3*1-1)/2 + 2*(3*2-1)/2 + 5*(3*5-1)/2 + 1*(3*1-1).
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 0..10000
- Xiang-Zi Meng and Zhi-Wei Sun, Sums of four polygonal numbers with coefficients, arXiv:1608.02022 [math.NT], 2016.
- Zhi-Wei Sun, A result similar to Lagrange's theorem, J. Number Theory 162(2016), 190-211.
Programs
-
Mathematica
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]] pQ[n_]:=pQ[n]=SQ[24n+1]&&(n==0||Mod[Sqrt[24n+1]+1,6]==0) Do[r=0;Do[If[pQ[n-x*(3x-1)-y(3y-1)/2-z(3z-1)/2],r=r+1],{x,0,(Sqrt[12n+1]+1)/6},{y,0,(Sqrt[8(n-x*(3x-1))+1]+1)/6},{z,y,(Sqrt[12(n-x*(3x-1)-y(3y-1)/2)+1]+1)/6}];Print[n," ",r];Continue,{n,0,80}]
Comments