login
A351940
a(n) is the number of partitions of the set {1,2,...,n} into lists having a prime number of elements.
1
1, 0, 2, 6, 12, 240, 480, 12600, 62160, 665280, 10009440, 94802400, 1497545280, 23662679040, 317854817280, 5236146115200, 102522189369600, 1772579589580800, 39459091697625600, 809304973699622400, 17463916757211724800, 388537548150495744000
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