OFFSET
0,5
COMMENTS
Two edges {a,b}, {c,d} are crossing if a < c < b < d or c < a < d < b, and nesting if a < c < d < b or c < a < b < d.
EXAMPLE
The a(4) = 28 edge-sets:
{13,24} {12,13,24} {12,13,14,23} {12,13,14,23,24} {12,13,14,23,24,34}
{14,23} {12,14,23} {12,13,14,24} {12,13,14,23,34}
{13,14,23} {12,13,23,24} {12,13,14,24,34}
{13,14,24} {12,13,24,34} {12,13,23,24,34}
{13,23,24} {12,14,23,24} {12,14,23,24,34}
{13,24,34} {12,14,23,34} {13,14,23,24,34}
{14,23,24} {13,14,23,24}
{14,23,34} {13,14,23,34}
{13,14,24,34}
{13,23,24,34}
{14,23,24,34}
MATHEMATICA
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[Subsets[Subsets[Range[n], {2}]], croXQ[#]||nesXQ[#]&]], {n, 0, 5}]
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Gus Wiseman, Jun 23 2019
STATUS
approved