A364283 Number of permutations of [n] with distinct cycle lengths such that each cycle contains exactly one cycle length different from its own as an element.
1, 0, 0, 1, 2, 12, 60, 408, 2640, 24480, 208080, 2262960, 23950080, 307359360, 3835641600, 57400358400, 825160089600, 13909727462400, 229664981145600, 4310966499840000, 79428141112320000, 1658163790483200000, 33795850208440320000, 770528520983789568000
Offset: 0
Keywords
Examples
a(3) = 1: (13)(2). a(4) = 2: (124)(3), (142)(3). a(5) = 12: (1235)(4), (1253)(4), (1325)(4), (1352)(4), (1523)(4), (1532)(4), (124)(35), (142)(35), (125)(34), (152)(34), (13)(245), (13)(254).
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..450
- Wikipedia, Permutation
Programs
-
Maple
f:= proc(n) option remember; `if`(n<2, 1-n, (n-1)*(f(n-1)+f(n-2))) end: a:= proc(m) option remember; local b; b:= proc(n, i, p) option remember; `if`(i*(i+1)/2