OFFSET
0,3
FORMULA
E.g.f.: Product_{k > 0} exp(x^prime(k)).
E.g.f.: exp(Sum_{k > 0} x^prime(k)).
a(0) = 1; a(n) = Sum_{p<=n, p prime} p! * binomial(n-1,p-1) * a(n-p).
EXAMPLE
a(2) = 2 : (12) (2! * 1 ways).
a(3) = 6 : (123) (3! * 1 ways).
a(4) = 12 : (12)(34) (2! * 2! * 3 ways).
a(5) = 240 : (12345) (5! * 1 ways), (123)(45) (3! * 2! * 10 ways).
a(6) = 480 : (123)(456) (3! * 3! * 10 ways), (12)(34)(56) (2! * 2! * 2! * 15 ways).
PROG
(PARI) my(N=40, x='x+O('x^N)); Vec(serlaplace(exp(sum(k=1, N, isprime(k)*x^k))))
(PARI) a(n) = if(n==0, 1, sum(k=1, n, isprime(k)*k!*binomial(n-1, k-1)*a(n-k)));
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Feb 26 2022
STATUS
approved