OFFSET
0,4
COMMENTS
Number of permutations of [n] whose cycle lengths are relatively prime to n.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..450
MAPLE
b:= proc(n, m) option remember; `if`(n=0, 1, add(`if`(
igcd(j, m)=1, b(n-j, m), 0)*(n-1)!/(n-j)!, j=1..n))
end:
a:= n-> b(n$2):
seq(a(n), n=0..23); # Alois P. Heinz, Oct 12 2020
MATHEMATICA
Table[n! SeriesCoefficient[Exp[Sum[Boole[GCD[n, k] == 1] x^k/k, {k, 1, n}]], {x, 0, n}], {n, 0, 22}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Oct 12 2020
STATUS
approved