A271608 Number of ordered ways to write n as pen(u) + pen(v) + pen(x) + pen(y) + pen(z) with u,v,x,y,z nonnegative integers such that u + 2*v + 4*x + 5*y + 6*z is a pentagonal number, where pen(k) denotes the pentagonal number k*(3k-1)/2.
1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 3, 3, 3, 3, 3, 3, 4, 2, 6, 4, 2, 1, 1, 8, 4, 5, 2, 2, 7, 10, 9, 2, 3, 4, 5, 6, 6, 5, 2, 7, 11, 11, 4, 1, 5, 8, 13, 8, 6, 5, 3, 8, 8, 12, 7, 3, 8, 18, 16, 12, 2, 7, 10, 15, 11, 10, 4, 4, 11, 15, 22
Offset: 0
Keywords
Examples
a(7) = 1 since 7 = 5 + 0 + 1 + 0 + 1 = pen(2) + pen(0) + pen(1) + pen(0) + pen(1) with 2 + 2*0 + 4*1 + 5*0 + 6*1 = 12 = pen(3). a(9) = 1 since 9 = 1 + 1 + 5 + 1 + 1 = pen(1) + pen(1) + pen(2) + pen(1) + pen(1) with 1 + 2*1 + 4*2 + 5*1 + 6*1 = 22 = pen(4). a(22) = 1 since 22 = 0 + 0 + 5 + 12 + 5 = pen(0) + pen(0) + pen(2) + pen(3) + pen(2) with 0 + 2*0 + 4*2 + 5*3 + 6*2 = 35 = pen(5). a(43) = 1 since 43 = 5 + 1 + 35 + 1 + 1 = pen(2) + pen(1) + pen(5) + pen(1) + pen(1) with 2 + 2*1 + 4*5 + 5*1 + 6*1 = 35 = pen(5).
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 0..1500
- Z.-W. Sun, On universal sums of polygonal numbers, Sci. China Math. 58(2015), no. 7, 1367-1396.
Programs
-
Mathematica
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]] pen[x_]:=pen[x]=x*(3x-1)/2 pQ[n_]:=pQ[n]=SQ[24n+1]&&(n==0||Mod[Sqrt[24n+1]+1,6]==0) Do[r=0;Do[If[pQ[n-pen[x]-pen[y]-pen[z]-pen[w]]&&pQ[x+2y+4z+5w+6*Floor[(Sqrt[24(n-pen[x]-pen[y]-pen[z]-pen[w])+1]+1)/6]],r=r+1],{x,0,(Sqrt[24n+1]+1)/6},{y,0,(Sqrt[24(n-pen[x])+1]+1)/6},{z,0,(Sqrt[24(n-pen[x]-pen[y])+1]+1)/6},{w,0,(Sqrt[24(n-pen[x]-pen[y]-pen[z])+1]+1)/6}];Print[n," ",r];Label[aa];Continue,{n,0,70}]
Comments