A306477 Number of ways to write n as C(w+2,2) + 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, 3, 5, 6, 5, 5, 8, 8, 6, 4, 6, 10, 10, 8, 6, 6, 6, 10, 9, 6, 6, 7, 7, 6, 8, 10, 10, 7, 4, 7, 7, 9, 13, 12, 9, 6, 5, 6, 11, 12, 12, 13, 10, 9, 8, 9, 11, 15, 12, 8, 8, 10, 14, 11, 7, 8, 12, 9, 8, 9, 10, 11, 13, 8, 5, 9, 10, 13, 14, 12, 8, 7, 6, 12, 14, 14
Offset: 1
Keywords
Examples
a(1) = 1 with 1 = C(2,2) + C(3,4) + C(5,6) + C(7,8). a(4655) = 2 with 4655 = C(85,2) + C(14,4) + C(9,6) + C(7,8) = C(94,2) + C(7,4) + C(9,6) + C(11,8). a(9590) = 2 with 9590 = C(35,2) + C(21,4) + C(7,6) + C(14,8) = C(136,2) + C(7,4) + C(10,6) + C(11,8). a(24935) = 2 with 24935 = C(49,2) + C(29,4) + C(7,6) + C(8,8) = C(140,2) + C(26,4) + C(10,6) + C(10,8). a(33845) = 2 with 33845 = C(104,2) + C(8,4) + C(19,6) + C(13,8) = C(148,2) + C(26,4) + C(16,6) + C(9,8). a(192080) = 2 with 192080 = C(7,2) + C(26,4) + C(25,6) + C(9,8) = C(414,2) + C(39,4) + C(8,6) + C(17,8). a(23343989) = 1 with 23343989 = C(365,2) + C(76,4) + C(40,6) + C(34,8).
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
- Zhi-Wei Sun, Positive integers written as C(w,2) + C(x,4) + C(y,6) + C(z,8) with w,x,y,z in {2,3,...}, Question 323541 on Mathoverflow, Feb. 19, 2019.
Programs
-
Mathematica
f[m_,n_]:=f[m,n]=Binomial[m+n-1,m]; TQ[n_]:=TQ[n]=IntegerQ[Sqrt[8n+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-1-f[8,z]-f[6,y]}];Label[aa],{y,0,n-1-f[8,z]}];Label[bb],{z,0,n-1}];Label[cc];tab=Append[tab,r],{n,1,80}];Print[tab]
Comments