OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..696
FORMULA
a(n) = A001100(n,floor(n/2)).
MAPLE
S:= proc(n) option remember; `if`(n<4, [1, 1, 2*t, 4*t+2*t^2]
[n+1], expand((n+1-t)*S(n-1) -(1-t)*(n-2+3*t)*S(n-2)
-(1-t)^2*(n-5+t)*S(n-3) +(1-t)^3*(n-3)*S(n-4)))
end:
a:= n-> coeff(S(n), t, floor(n/2)):
seq(a(n), n=0..30);
MATHEMATICA
s[n_] := s[n] = If[n < 4, {1, 1, 2*t, 4*t + 2*t^2}[[n + 1]], Expand[(n + 1 - t)*s[n - 1] - (1 - t)*(n - 2 + 3*t)*s[n - 2] - (1 - t)^2*(n - 5 + t)*s[n - 3] + (1 - t)^3*(n - 3)*s[n - 4]]];
t[n_, k_] := Ceiling[Coefficient[s[n], t, k]];
a[n_] := t[n, Floor[n/2]];
a /@ Range[0, 30] (* Jean-François Alcover, Sep 25 2019, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Dec 02 2018
STATUS
approved