%I #18 Jan 12 2020 12:58:51
%S 1,1,4,20,130,1052,10214,115684,1497458,21806372,352834942,6279885284,
%T 121932835754,2564788969108,58098821674742,1410088008633812,
%U 36505125340079074,1004131069129741124,29244927598399536878,899066450011962665092,29094401487631077315482,988590340245276942963764
%N Expansion of e.g.f. (2*exp(x)-1-2*x-x^2)/(1-x-x^2).
%C Number of associative and quasitrivial binary operations on an n-element set that are order-preserving for some total ordering.
%C Convention a(0) = 1.
%H J. Devillet, J.-L. Marichal, and B. Teheux <a href="https://arxiv.org/abs/1811.11113">Classifications of quasitrivial semigroups</a>, arXiv:1811.11113 [math.RA], 2018.
%F Recurrence: a(1) = 1, a(2) = 4, a(n+2) = 2 + (n+2)*a(n+1) + (n+2)*(n+1)*a(n).
%F a(n) = n!*A000045(n) + 2*Sum_{i=0..n} (n!/(n + 1 - i)!)*A000045(i).
%t Nest[Append[#1, 2 + #2 #1[[-1]] + #2 (#2 - 1) #1[[-2]] ] & @@ {#, Length@ #} &, {1, 1, 4}, 19] (* _Michael De Vlieger_, Apr 21 2019 *)
%t With[{nn=30},CoefficientList[Series[(2Exp[x]-1-2x-x^2)/(1-x-x^2),{x,0,nn}],x] Range[0,nn]!] (* _Harvey P. Dale_, Jan 12 2020 *)
%o (PARI) my(x='x+O('x^30)); Vec(serlaplace((2*exp(x)-1-2*x-x^2)/(1-x-x^2))) \\ _Felix Fröhlich_, Mar 19 2019
%Y Cf. A000045, A307005.
%K nonn,easy
%O 0,3
%A _J. Devillet_, Mar 19 2019
%E More terms from _Michel Marcus_, Apr 20 2019