OFFSET
1,5
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..1000
FORMULA
a(n) is the coefficient of x^0 in Product_{k=1..n} x^(-2k)+x^k.
EXAMPLE
For n=5 we have 5/1234, 14/532 and 23/541 so a(5)=3.
MAPLE
A113035:= proc(n) local i, j, p, t; t:= NULL; for j to n do p:=1; for i to j do p:=p*(x^(-2*i)+x^(i)); od; t:=t, coeff(p, x, 0); od; t; end;
# second Maple program:
b:= proc(n, i) option remember; local m; m:= i*(i+1)/2;
`if`(n>m, 0, `if`(n=m, 1, b(abs(n-i), i-1) +b(n+i, i-1)))
end:
a:= n-> `if`(irem(n, 3)=1, 0, b(n*(n+1)/6, n)):
seq(a(n), n=1..60); # Alois P. Heinz, Oct 31 2011
MATHEMATICA
b[n_, i_] := b[n, i] = Module[{m = i(i+1)/2}, If[n > m, 0, If[n == m, 1, b[Abs[n - i], i - 1] + b[n + i, i - 1]]]];
a[n_] := If[Mod[n, 3] == 1, 0, b[n(n+1)/6, n]];
Array[a, 60] (* Jean-François Alcover, Nov 18 2020, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Floor van Lamoen, Oct 11 2005
STATUS
approved