A286072 Number of permutations of [n] where adjacent cycles differ in size.
1, 1, 1, 5, 16, 84, 512, 3572, 28080, 256820, 2553728, 28064776, 337319944, 4385615904, 61255920936, 921584068648, 14720437293952, 250190161426720, 4507229152534944, 85630125536152160, 1711040906290680448, 35969941361999955392, 790961860293623563648
Offset: 0
Keywords
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..450
- Wikipedia, Permutation
Programs
-
Maple
b:= proc(n, i) option remember; `if`(n=0, 1, add(`if`(i=j, 0, (j-1)!*b(n-j, `if`(j>n-j, 0, j))*binomial(n-1, j-1)), j=1..n)) end: a:= n-> b(n, 0): seq(a(n), n=0..30);
-
Mathematica
b[n_, i_] := b[n, i] = If[n == 0, 1, Sum[If[i == j, 0, (j - 1)!*b[n - j, If[j > n - j, 0, j]]*Binomial[n - 1, j - 1]], {j, 1, n}]]; a[n_] := b[n, 0]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, May 24 2018, translated from Maple *)
Comments