OFFSET
0,4
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..400
Wikipedia, Permutation
FORMULA
a(n) = A143947(n,2n-1) for n>=1, a(0) = 1.
EXAMPLE
a(4) = 7 = A143947(4,7): (123)(4), (132)(4), (124)(3), (142)(3), (13)(24),
(14)(23), (1)(2)(34).
a(5) = 27 = A143947(5,9): (1234)(5), (1243)(5), (1324)(5), (1342)(5), (1423)(5), (1432)(5), (1235)(4), (1253)(4), (1325)(4), (1352)(4), (1523)(4), (1532)(4), (124)(35), (142)(35), (125)(34), (152)(34), (134)(25), (143)(25), (135)(24), (153)(24), (14)(235), (14)(253), (15)(234), (15)(243), (1)(23)(45), (1)(245)(3), (1)(254)(3).
MAPLE
b:= proc(n) option remember;
`if`(n=0, 1, expand(b(n-1)*(t-n+x^n)))
end:
a:= n-> max(coeffs(subs(t=n, b(n)))):
seq(a(n), n=0..23);
MATHEMATICA
a[n_] := If[n == 0, 1, Module[{t}, CoefficientList[Product[n-k+t^k, {k, 1, n-1}]*t^(n-1), t] // Max]];
Table[a[n], {n, 0, 23}] (* Jean-François Alcover, Oct 03 2024 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jan 03 2024
STATUS
approved