OFFSET
0,5
FORMULA
a(n) = n! * Sum_{k=0..floor(n/3)} binomial(n-k-1,n-3*k)/(6^k * k!).
a(0) = 1; a(n) = ((n-1)!/6) * Sum_{k=3..n} k * (k-2) * a(n-k)/(n-k)!.
PROG
(PARI) a(n) = n!*sum(k=0, n\3, binomial(n-k-1, n-3*k)/(6^k*k!));
(PARI) a_vector(n) = my(v=vector(n+1)); v[1]=1; for(i=1, n, v[i+1]=(i-1)!/6*sum(j=3, i, j*(j-2)*v[i-j+1]/(i-j)!)); v;
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Jun 17 2024
STATUS
approved