OFFSET
1,2
COMMENTS
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
EXAMPLE
a(1) = 1 with 1 = C(2,2) + C(2,3) + C(3,4) + C(4,5).
a(4) = 1 with 4 = C(2,2) + C(3,3) + C(4,4) + C(5,5).
a(5) = 1 with 5 = C(2,2) + C(4,3) + C(3,4) + C(4,5).
a(14) = 1 with 14 = C(4,2) + C(3,3) + C(4,4) + C(6,5).
a(19) = 1 with 19 = C(6,2) + C(4,3) + C(3,4) + C(4,5).
MATHEMATICA
f[m_, n_]:=f[m, n]=Binomial[m+n-1, m];
HQ[n_]:=HQ[n]=IntegerQ[Sqrt[8n+1]]&&Mod[Sqrt[8n+1], 4]==3;
tab={}; Do[r=0; Do[If[f[5, z]>=n, Goto[cc]]; Do[If[f[4, y]>=n-f[5, z], Goto[bb]]; Do[If[f[3, x]>=n-f[5, z]-f[4, y], Goto[aa]]; If[HQ[n-f[5, z]-f[4, y]-f[3, x]], r=r+1], {x, 0, n-1-f[5, z]-f[4, y]}]; Label[aa], {y, 0, n-1-f[5, z]}]; Label[bb], {z, 0, n-1}]; Label[cc]; tab=Append[tab, r], {n, 1, 80}]; Print[tab]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Feb 17 2019
STATUS
approved