OFFSET
0,2
COMMENTS
Previous name was: A simple grammar.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..444
INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 835
FORMULA
E.g.f.: (-x-exp(-x/(-1+x))+exp(-x/(-1+x))*x)/(-1+x).
Recurrence: {a(0)=1, a(1)=2, a(2)=5, (-n^3-2*n-3*n^2)*a(n)+(3*n^2+10*n+8)*a(n+1)+(-3*n-7)*a(n+2)+a(n+3)}.
a(n) = n! + A000262(n) for n>0. - Vladeta Jovovic, Nov 29 2002
MAPLE
spec := [S, {B=Sequence(Z, 1 <= card), C=Set(B), S=Union(B, C)}, labeled]: seq(combstruct[count](spec, size=n), n=0..20);
# second Maple program:
b:= proc(n) option remember; `if`(n=0, 1, add(
b(n-j)*binomial(n-1, j-1)*j!, j=1..n))
end:
a:= n-> `if`(n=0, 1, b(n)+n!):
seq(a(n), n=0..25); # Alois P. Heinz, May 10 2016
MATHEMATICA
a[n_] := If[n==0, 1, n! (1+Sum[Binomial[n-1, j]/(j+1)!, {j, 0, n-1}])];
a /@ Range[0, 21] (* Jean-François Alcover, Nov 17 2020 *)
Flatten[{1, Table[n!*(1 + Hypergeometric1F1[1 - n, 2, -1]), {n, 1, 21}]}] (* Vaclav Kotesovec, Nov 17 2020 *)
nmax = 20; CoefficientList[Series[x/(1 - x) + E^(x/(1 - x)), {x, 0, nmax}], x] * Range[0, nmax]! (* Vaclav Kotesovec, Nov 17 2020 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
encyclopedia(AT)pommard.inria.fr, Jan 25 2000
EXTENSIONS
New name, using e.g.f., from Michel Marcus, Nov 17 2020
STATUS
approved