OFFSET
0,4
LINKS
Paolo Xausa, Table of n, a(n) for n = 0..400
A. Claesson and T. Mansour, Counting Occurrences of a Pattern of Type (1,2) or (2,1) in Permutations, Advances in Applied Mathematics, 29 (2002), 293-310.
FORMULA
a(0)=0; a(n)=a(n-1)+Sum_{k=1..n-1} binomial(n, k)*a(k)+binomial(n-1, k-1)*B(k) where B(k) is the k-th Bell number.
MATHEMATICA
PROG
(PARI) B(n)=round(exp(-1)*sum(k=0, 200, k^n/k!));
an=vector(100); a(n)=if(n<1, 0, an[n]);
for(n=1, 30, an[n]=a(n-1)+sum(k=1, n-1, binomial(n, k)*a(k)+binomial(n-1, k-1)*B(k)));
an
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Aug 28 2003
STATUS
approved