OFFSET
0,6
COMMENTS
A set partition is crossing if it has two blocks of the form {...x,y...}, {...z,t...} where x < z < y < t or z < x < t < y, and nesting if it has two blocks of the form {...x,y...}, {...z,t...} where x < z < t < y or z < x < y < t.
LINKS
Christian Sievers, Table of n, a(n) for n = 0..576
FORMULA
EXAMPLE
The a(5) = 2 set partitions:
{{1,4},{2,3,5}}
{{1,3,4},{2,5}}
MATHEMATICA
sps[{}]:={{}}; sps[set:{i_, ___}]:=Join@@Function[s, Prepend[#, s]&/@sps[Complement[set, s]]]/@Cases[Subsets[set], {i, ___}];
croXQ[stn_]:=MatchQ[stn, {___, {___, x_, y_, ___}, ___, {___, z_, t_, ___}, ___}/; x<z<y<t||z<x<t<y];
nesXQ[stn_]:=MatchQ[stn, {___, {___, x_, y_, ___}, ___, {___, z_, t_, ___}, ___}/; x<z<t<y||z<x<y<t];
Table[Length[Select[sps[Range[n]], nesXQ[#]&&croXQ[#]&]], {n, 0, 8}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jun 20 2019
EXTENSIONS
a(11) and beyond from Christian Sievers, Oct 16 2024
STATUS
approved