OFFSET
4,1
COMMENTS
A nontrivial cycle has size > 1.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 4..450
Wikipedia, Permutation
FORMULA
E.g.f.: (log(1-x)+x)^2/2*exp(x).
-(n+1)*(n+2)*(n+3)*(n+4)*a(n)+(5+3*n)*(n+4)*(n+3)*(n+2)*a(n+1)-(n+4)*(n+3)*(3*n^2+15*n+16)*a(n+2)+(n+4)*(n^3+12*n^2+38*n+32)*a(n+3)-(2*n^3+18*n^2+48*n+35)*a(n+4)+(n+3)*(n+1)*a(n+5)=0. - Robert Israel, Mar 22 2018
EXAMPLE
a(4) = 3: (12)(34), (13)(24), (14)(23).
MAPLE
S:= series((log(1-x)+x)^2/2*exp(x), x, 31):
seq(coeff(S, x, j)*j!, j=4..30); # Robert Israel, Mar 22 2018
MATHEMATICA
Drop [Range[0, 30]! CoefficientList[Series[(Log[1 - x] + x)^2 / 2 Exp[x], {x, 0, 30}], x], 4] (* Vincenzo Librandi, Jul 22 2017 *)
PROG
(PARI) x='x+O('x^99); Vec(serlaplace((log(1-x)+x)^2/2*exp(x))) \\ Altug Alkan, Mar 22 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jul 16 2017
STATUS
approved