cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A053195 Number of level permutations of degree n.

Original entry on oeis.org

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

Views

Author

Vladeta Jovovic, Mar 02 2000

Keywords

Comments

A permutation is level if the powers of 2 dividing its cycle lengths are all equal.
For odd n, level permutations of degree n are just permutations that have odd order, i.e., A053195(2*n+1) = A000246(2*n+1). - Vladeta Jovovic, Sep 29 2004

Crossrefs

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