A053195 Number of level permutations of degree n.
1, 1, 2, 3, 18, 45, 360, 1575, 20790, 99225, 1332450, 9823275, 181496700, 1404728325, 26221595400, 273922023375, 7196040101250, 69850115960625, 1662139682453250, 22561587455281875, 675158520854317500, 9002073394657468125, 259715927440434465000
Offset: 0
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..400
- L. Babai and P. J. Cameron, Automorphisms and enumeration of switching classes of tournaments, Electron. J. Combin., 7 (2000), no. 1, Research Paper 38, 25 pp.
Programs
-
Maple
with(combinat): b:= proc(n, i, p) option remember; `if`(n=0, 1, `if`(i<1, 0, add(multinomial(n, n-i*j, i$j)/j!*(i-1)!^j* b(n-i*j, i-2*p, p), j=0..n/i))) end: a:= n-> (m-> `if`(n=0, 1, add(b(n, (h-> h-1+irem(h, 2) )(iquo(n, 2^j))*2^j, 2^j), j=0..m)))(ilog2(n)): seq(a(n), n=0..25); # Alois P. Heinz, Jun 11 2015
-
Mathematica
multinomial[n_, k_List] := n!/Times @@ (k!); b[n_, i_, p_] := b[n, i, p] = If[n == 0, 1, If[i<1, 0, Sum[multinomial[n, Join[{n-i*j}, Array[i&, j]]]/j!*(i-1)!^j*b[n - i*j, i-2*p, p], {j, 0, n/i}]]]; a[n_] := Function[{m}, If[n == 0, 1, Sum[ b[n, Function [{h}, h - 1 + Mod[h, 2]][Quotient[n, 2^j]]*2^j, 2^j], {j, 0, m}]]][Log[2, n] // Floor]; Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Jul 07 2015, after Alois P. Heinz *)
Extensions
a(0)=1 prepended by Alois P. Heinz, Jun 11 2015
Comments