OFFSET
0,4
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.
LINKS
FORMULA
Conjectures from Colin Barker, Jun 21 2019: (Start)
G.f.: x^2*(1 + 4*x - 3*x^2) / (1 - x)^5.
a(n) = (n*(12 - 19*n + 6*n^2 + n^3)) / 12.
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5) for n>4.
(End)
EXAMPLE
The a(3) = 9 pairs of edges:
{12,12}
{12,13}
{12,23}
{13,12}
{13,13}
{13,23}
{23,12}
{23,13}
{23,23}
MATHEMATICA
croXQ[stn_]:=MatchQ[stn, {___, {x_, y_}, ___, {z_, t_}, ___}/; x<z<y<t||z<x<t<y];
nestQ[stn_]:=MatchQ[stn, {___, {x_, y_}, ___, {z_, t_}, ___}/; x<z<t<y||z<x<y<t];
Table[Length[Select[Tuples[Subsets[Range[n], {2}], 2], !nesXQ[#]&&!croXQ[#]&]], {n, 0, 10}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jun 20 2019
STATUS
approved