A306459 Number of ways to write n as w^3 + C(x+2,3) + C(y+2,3) + C(z+2,3), where w,x,y,z are nonnegative integers with x <= y <= z, and C(m,k) denotes the binomial coefficient m!/(k!*(m-k)!).
1, 2, 2, 2, 2, 2, 2, 1, 2, 3, 3, 3, 4, 3, 2, 2, 2, 1, 2, 2, 4, 4, 4, 2, 2, 3, 2, 1, 4, 4, 4, 4, 4, 2, 1, 3, 4, 3, 4, 4, 4, 5, 3, 2, 3, 4, 2, 4, 5, 3, 2, 4, 2, 1, 1, 3, 4, 6, 4, 2, 3, 4, 2, 3, 5, 4, 5, 7, 5, 2, 4, 4, 4, 3, 3, 4, 6, 4, 4, 2, 2, 2, 4, 3, 6, 6, 5, 4, 6, 3, 2, 3, 6, 4, 6, 4, 4, 4, 4, 3, 3
Offset: 0
Keywords
Examples
a(0) = 1 with 0 = 0^3 + C(2,3) + C(2,3) + C(2,3). a(17) = 1 with 17 = 2^3 + C(3,3) + C(4,3) + C(4,3). a(27) = 1 with 27 = 3^3 + C(2,3) + C(2,3) + C(2,3). a(362) = 1 with 362 = 0^3 + C(6,3) + C(8,3) + C(13,3). a(443) = 1 with 443 = 3^3 + C(5,3) + C(10,3) + C(13,3). a(1174) = 1 with 1174 = 1^3 + C(9,3) + C(10,3) + C(19,3). a(1284) = 1 with 1284 = 10^3 + C(7,3) + C(9,3) + C(11,3).
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 0..10000
Programs
-
Mathematica
f[n_]:=f[n]=Binomial[n+2,3]; CQ[n_]:=CQ[n]=IntegerQ[n^(1/3)]; tab={};Do[r=0;Do[If[f[x]>n/3,Goto[cc]];Do[If[f[y]>(n-f[x])/2,Goto[bb]];Do[If[f[z]>n-f[x]-f[y],Goto[aa]];If[CQ[n-f[x]-f[y]-f[z]],r=r+1],{z,y,n-f[x]-f[y]}];Label[aa],{y,x,(n-f[x])/2}];Label[bb],{x,0,n/3}];Label[cc];tab=Append[tab,r],{n,0,100}];Print[tab]
Comments