A306571 Number of ways to write n as w*(w+1) + C(x+3,4) + C(y+5,6) + C(z+7,8) with w,x,y,z nonnegative integers, where C(m,k) denotes the binomial coefficient m!/(k!*(m-k)!).
1, 3, 4, 4, 3, 2, 3, 6, 7, 5, 4, 4, 6, 7, 7, 6, 6, 6, 6, 5, 4, 8, 9, 6, 3, 4, 4, 6, 7, 7, 6, 8, 5, 5, 4, 8, 10, 9, 5, 5, 5, 5, 8, 10, 10, 9, 8, 7, 9, 9, 7, 8, 8, 7, 7, 6, 7, 12, 12, 8, 2, 3, 6, 11, 9, 8, 9, 7, 2, 4, 5, 8, 13, 14, 8, 6, 6, 8, 9, 9, 11, 8, 7, 7, 10, 9, 10, 11, 8, 7, 9, 11, 13, 11, 8, 5, 6, 7, 10, 10, 13
Offset: 0
Keywords
Examples
a(0) = 1 with 0 = 0*1 + C(3,4) + C(5,6) + C(7,8). a(60) = 2 with 60 = 0*1 + C(6,4) + C(5,6) + C(10,8) = 5*6 + C(4,4) + C(8,6) + C(8,8). a(220544) = 1 with 220544 = 151*152 + C(48,4) + C(14,6) + C(9,8). a(809165) = 1 with 809165 = 295*296 + C(63,4) + C(10,6) + C(20,8). a(16451641) = 1 with 16451641 = 2256*2257 + C(130,4) + C(12,6) + C(10,8).
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 0..10000
Programs
-
Mathematica
f[m_,n_]:=f[m,n]=Binomial[m+n-1,m]; TQ[n_]:=TQ[n]=IntegerQ[Sqrt[4n+1]]; tab={};Do[r=0;Do[If[f[8,z]>n,Goto[cc]];Do[If[f[6,y]>n-f[8,z],Goto[bb]];Do[If[f[4,x]>n-f[8,z]-f[6,y],Goto[aa]];If[TQ[n-f[8,z]-f[6,y]-f[4,x]],r=r+1],{x,0,n-f[8,z]-f[6,y]}];Label[aa],{y,0,n-f[8,z]}];Label[bb],{z,0,n}];Label[cc];tab=Append[tab,r],{n,0,100}];Print[tab]
Comments