OFFSET
0,3
COMMENTS
Also the number of partitions of [n] where the first k elements are marked (1 <= k <= n) and at least k blocks contain their own index: a(3) = 9 = 5 + 3 + 1: 1'23, 1'2|3, 1'3|2, 1'|23, 1'|2|3, 1'3|2', 1'|2'3, 1'|2'|3, 1'|2'|3'.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..575
Wikipedia, Partition of a set
FORMULA
EXAMPLE
a(3) = 9 = 1 + 1 + 2 + 2 + 3: 123, 12|3, 13|2, 1|23, 1|2|3.
MAPLE
b:= proc(n, m) option remember;
`if`(n=0, 1, b(n-1, m+1)+m*b(n-1, m))
end:
a:= n-> add(b(n-i, i), i=1..n):
seq(a(n), n=0..25);
MATHEMATICA
b[n_, m_] := b[n, m] = If[n == 0, 1, b[n - 1, m + 1] + m*b[n - 1, m]];
a[n_] := Sum[b[n - i, i], {i, 1, n}];
Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Jan 11 2022, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jan 07 2022
STATUS
approved