login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A362362
Number of permutations of [n] such that each cycle contains its length as an element.
7
1, 1, 1, 3, 8, 36, 174, 1104, 7440, 62640, 545040, 5649840, 60681600, 748621440, 9518342400, 136758585600, 2009451628800, 32848492723200, 549241915622400, 10066913176320000, 188293339922688000, 3832031198451456000, 79291640831090688000, 1771146970953744384000
OFFSET
0,4
COMMENTS
The cycle lengths are distinct as a consequence of the definition.
LINKS
Wikipedia, Permutation
EXAMPLE
a(3) = 3: (123), (132), (1)(23).
a(4) = 8: (1234), (1243), (1324), (1342), (1423), (1432), (1)(234), (1)(243).
MAPLE
a:= n-> add((n-nops(p))!, p=select(l-> nops(l)=
nops({l[]}), combinat[partition](n))):
seq(a(n), n=0..24);
# second Maple program:
b:= proc(n, i, p) option remember; `if`(i*(i+1)/2<n, 0,
`if`(n=0, p!, b(n, i-1, p)+b(n-i, min(n-i, i-1), p-1)))
end:
a:= n-> b(n$3):
seq(a(n), n=0..24);
MATHEMATICA
b[n_, i_, p_] := b[n, i, p] = If[i*(i + 1)/2 < n, 0, If[n == 0, p!, b[n, i - 1, p] + b[n - i, Min[n - i, i - 1], p - 1]]];
a[n_] := b[n, n, n];
Table[a[n], {n, 0, 24}] (* Jean-François Alcover, Nov 15 2023, from second Maple program *)
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jul 05 2023
STATUS
approved