A275429 Number of set partitions of [n] such that n is a multiple of each block size.
1, 1, 2, 2, 11, 2, 167, 2, 1500, 1206, 16175, 2, 3486584, 2, 3188421, 29226654, 772458367, 2, 130880325103, 2, 4173951684174, 623240762412, 644066092301, 2, 220076136813712815, 31580724696908, 538897996103277, 49207275464475052, 44147498142028751570, 2
Offset: 0
Keywords
Examples
a(4) = 11: 1234, 12|34, 12|3|4, 13|24, 13|2|4, 14|23, 1|23|4, 14|2|3, 1|24|3, 1|2|34, 1|2|3|4. a(5) = 2: 12345, 1|2|3|4|5.
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..587
- Wikipedia, Partition of a set
Crossrefs
Main diagonal of A275422.
Programs
-
Maple
A:= proc(n, k) option remember; `if`(n=0, 1, add( `if`(j>n, 0, A(n-j, k)*binomial(n-1, j-1)), j= `if`(k=0, 1..n, numtheory[divisors](k)))) end: a:= n-> A(n$2): seq(a(n), n=0..30);
-
Mathematica
A[n_, k_] := A[n, k] = If[n == 0, 1, Sum[If[j > n, 0, A[n - j, k]* Binomial[n - 1, j - 1]], {j, If[k == 0, Range[n], Divisors[k]]}]]; a[n_] := A[n, n]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, May 17 2018, translated from Maple *)
Formula
a(n) = n! * [x^n] exp(Sum_{d|n} x^d/d!) for n>0, a(0) = 1.
a(n) = A275422(n,n).
a(p) = 2 for p prime.