OFFSET
0,4
COMMENTS
At least one block length occurs exactly once.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..576
Wikipedia, Partition of a set
FORMULA
a(n) = A271424(n,1).
EXAMPLE
a(1) = 1: 1.
a(2) = 1: 12.
a(3) = 4: 123, 12|3, 13|2, 1|23.
a(4) = 11: 1234, 123|4, 124|3, 12|3|4, 134|2, 13|2|4, 1|234, 1|23|4, 14|2|3, 1|24|3, 1|2|34.
MAPLE
with(combinat):
b:= proc(n, i, k) option remember; `if`(n=0, 1,
`if`(i<1, 0, add(multinomial(n, n-i*j, i$j)
*b(n-i*j, i-1, k)/j!, j={0, $k..n/i})))
end:
a:= n-> b(n$2, 1)-b(n$2, 2):
seq(a(n), n=0..30);
MATHEMATICA
multinomial[n_, k_List] := n!/Times @@ (k!);
b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i < 1, 0, Sum[multinomial[n, Join[{n - i*j}, Table[i, j]]]*b[n - i*j, i - 1, k]/j!, {j, Join[{0}, Range[k, n/i]]}]]];
a[n_] := b[n, n, 1] - b[n, n, 2];
Table[a[n], {n, 0, 30}] (* Jean-François Alcover, May 07 2018, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Apr 07 2016
STATUS
approved