OFFSET
0,4
COMMENTS
a(n) is the number of n-permutations composed only of odd cycles of distinct length. - Geoffrey Critzer, Mar 08 2013
Also the number of permutations p of [n] with unique (functional) square root, i.e., there exists a unique permutation g such that g^2 = p. - Keith J. Bauer, Jan 08 2024
LINKS
Seiichi Manyama, Table of n, a(n) for n = 0..450
FORMULA
E.g.f.: Product_{m >= 1} (1+x^(2*m-1)/(2*m-1)). - Vladeta Jovovic, Nov 05 2003
a(n) ~ exp(-gamma/2) * n! / sqrt(2*n), where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Jul 23 2019
a(n) = n! - A088335(n). - Alois P. Heinz, Jan 27 2020
MAPLE
b:= proc(n, i) option remember; `if`(((i+1)/2)^2<n, 0,
`if`(n=0, 1, b(n, i-2)+`if`(i>n, 0, (i-1)!*
b(n-i, i-2)*binomial(n, i))))
end:
a:= n-> b(n, n-1+irem(n, 2)):
seq(a(n), n=0..30); # Alois P. Heinz, Nov 01 2017
MATHEMATICA
nn=20; Range[0, nn]!CoefficientList[Series[Product[1+x^(2i-1)/(2i-1), {i, 1, nn}], {x, 0, nn}], x] (* Geoffrey Critzer, Mar 08 2013 *)
PROG
(PARI) {a(n)=n!*polcoeff( prod(k=1, n, 1+(k%2)*x^k/k, 1+x*O(x^n)), n)} /* Michael Somos, Sep 19 2006 */
CROSSREFS
KEYWORD
nonn
AUTHOR
Yuval Dekel (dekelyuval(AT)hotmail.com), Nov 01 2003
EXTENSIONS
More terms from Vladeta Jovovic, Nov 03 2003
a(0)=1 prepended by Seiichi Manyama, Nov 01 2017
STATUS
approved