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”).

A261961
Number of ordered set partitions of {1,2,...,n} such that no part has the same size as any of its two immediate predecessors.
3
1, 1, 1, 7, 9, 31, 403, 1597, 7913, 68551, 539691, 4359037, 48419715, 560648557, 4985097601, 59798395027, 869794249513, 11143895125527, 159575614945315, 2593765421983597, 38615447492264219, 642012651525487501, 11768461266053785921, 220201814964135821967
OFFSET
0,4
LINKS
MAPLE
b:= proc(n, i, j) option remember; `if`(n=0, 1, add(
`if`(k=i or k=j, 0, (t-> binomial(n, k)*b(t,
`if`(k>t, 0, k), `if`(i>t, 0, i)))(n-k)), k=1..n))
end:
a:= n-> b(n, 0$2):
seq(a(n), n=0..30);
MATHEMATICA
b[n_, i_, j_] := b[n, i, j] = If[n == 0, 1, Sum[If[k == i || k == j, 0, Function[t, Binomial[n, k]*b[t, If[k > t, 0, k], If[i > t, 0, i]]][n - k]], {k, 1, n}]];
a[n_] := b[n, 0, 0];
Table[a[n], {n, 0, 30}] (* Jean-François Alcover, May 24 2018, translated from Maple *)
CROSSREFS
Column k=2 of A261959.
Cf. A261962.
Sequence in context: A272433 A272432 A272431 * A177030 A189974 A316184
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Sep 06 2015
STATUS
approved