OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..450
FORMULA
a(n) = (n! + (2*floor(n/2))!! + 2 + 2*Sum_{k=1..floor(n/2)} (Product_{j=0..k-1} binomial(n-2j,2))/k!)/4.
For n > 1, a(n) = (n! + (2*floor(n/2))!!)/4 + A001475(n-1). - Vaclav Kotesovec, May 19 2020
EXAMPLE
For n=3, the a(3)=4 orbits are {(1,2,3)}, {(1,3,2),(2,1,3)}, {(2,3,1),(3,1,2)}, and {(3,2,1)}.
MAPLE
a:= proc(n) option remember; `if`(n<6, [1$2, 2, 4, 13, 45][n+1],
((15*n^2+11*n-161)*a(n-1)-(19*n^2-100*n+65)*a(n-2)
-(30*n^3-87*n^2-81*n+266)*a(n-3)+68*(n-2)*(n-3)^2*a(n-4)
+(n-3)*(n-4)*(15*n^2-23*n-16)*a(n-5)-2*(17*n-33)*(n-3)*
(n-4)*(n-5)*a(n-6))/(15*n-38))
end:
seq(a(n), n=0..35); # Alois P. Heinz, Mar 30 2018
MATHEMATICA
Table[(n! + (2 Floor[n/2])!! + 2 + 2 Sum[Product[Binomial[n - 2 j, 2], {j, 0, k - 1}]/k!, {k, Floor[n/2]}])/4, {n, 22}] (* Michael De Vlieger, Mar 16 2018 *)
Table[(n! + (2*Floor[n/2])!!)/4 + I^(1 - n) * 2^((n - 3)/2) * HypergeometricU[(1 - n)/2, 3/2, -1/2], {n, 0, 25}] (* Vaclav Kotesovec, May 19 2020 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Sara Billey, Philippe Nadeau, Jordan Weaver, Jesse Rivera, Justin Shyi, Mar 15 2018
EXTENSIONS
a(19)-a(22) from Michael De Vlieger, Mar 16 2018
a(0)=1 prepended by Alois P. Heinz, Mar 30 2018
STATUS
approved