%I #30 Jul 25 2023 09:25:31
%S 1,0,1,1,3,11,25,127,441,1954,10011,45266,264583,1445380,8585655,
%T 55660801,352151073,2482766225,17559191557,129772490863,1013321885751,
%U 7972553309386,66428256850935,564371629663172,4946383948336009,45027627776367801,416996057365437135
%N The number of partitions of the set {1,2,...,n} into subsets (blocks,cells) having a prime number of elements.
%C Equivalently, a(n) is the number of equivalence relations on a set of n distinct elements such that each equivalence class contains a prime number of elements.
%H Alois P. Heinz, <a href="/A190476/b190476.txt">Table of n, a(n) for n = 0..250</a>
%F E.g.f.: exp(Sum_{p=prime} x^p/p!).
%F a(0) = 1; a(n) = Sum_{p<=n, p prime} binomial(n-1,p-1) * a(n-p). - _Seiichi Manyama_, Feb 26 2022
%p with(numtheory):
%p b:= proc(n, i) option remember; local p;
%p if n=0 then 1
%p elif n=1 or i<1 then 0
%p else p:= ithprime(i);
%p b(n, i-1) +add(mul(binomial(n-(h-1)*p, p), h=1..j)
%p *b(n-j*p, i-1)/j! , j=1..iquo(n,p))
%p fi
%p end:
%p a:= n-> b(n, pi(n)):
%p seq(a(n), n=0..30); # _Alois P. Heinz_, Nov 02 2011
%t a= Table[Prime[n],{n,1,20}];
%t b= Sum[x^i/i!,{i,a}];
%t Range[0,20]! CoefficientList[Series[Exp[b],{x,0,20}],x]
%o (PARI) my(N=40, x='x+O('x^N)); Vec(serlaplace(exp(sum(k=1, N, isprime(k)*x^k/k!)))) \\ _Seiichi Manyama_, Feb 26 2022
%o (PARI) a(n) = if(n==0, 1, sum(k=1, n, isprime(k)*binomial(n-1, k-1)*a(n-k))); \\ _Seiichi Manyama_, Feb 26 2022
%Y Cf. A000110, A364450.
%K nonn
%O 0,5
%A _Geoffrey Critzer_, May 10 2011