login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Number of set partitions of [n] where all prime-indexed blocks are not singletons.
2

%I #19 May 08 2020 16:33:09

%S 1,1,1,2,5,15,60,286,1423,7185,37758,212596,1293577,8415869,57715274,

%T 414520958,3125102795,24880061105,209909409566,1871945790360,

%U 17503956383037,169851122851049,1694189515772750,17248694322541778,178473482993477591,1873036127628583885

%N Number of set partitions of [n] where all prime-indexed blocks are not singletons.

%H Alois P. Heinz, <a href="/A332248/b332248.txt">Table of n, a(n) for n = 0..576</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Partition_of_a_set">Partition of a set</a>

%e a(1) = 1: 1.

%e a(2) = 1: 12.

%e a(3) = 2: 123, 1|23.

%e a(4) = 5: 1234, 12|34, 13|24, 14|23, 1|234.

%e a(5) = 15: 12345, 123|45, 124|35, 125|34, 12|345, 134|25, 135|24, 13|245, 145|23, 14|235, 15|234, 1|2345, 1|23|45, 1|24|35, 1|25|34.

%p b:= proc(n, i) option remember; `if`(n=0, 1, add(b(n-j, i+1)*

%p binomial(n-1, j-1), j=`if`(isprime(i), 2, 1)..n))

%p end:

%p a:= n-> b(n, 1):

%p seq(a(n), n=0..32);

%t b[n_, i_] := b[n, i] = If[n==0, 1, Sum[b[n-j, i+1] Binomial[n-1, j-1], {j, If[PrimeQ[i], 2, 1], n}]];

%t a[n_] := b[n, 1];

%t a /@ Range[0, 32] (* _Jean-François Alcover_, May 08 2020, after Maple *)

%Y Cf. A000040, A000110, A000296, A332398.

%K nonn

%O 0,4

%A _Alois P. Heinz_, Feb 12 2020