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.

A286072 Number of permutations of [n] where adjacent cycles differ in size.

Original entry on oeis.org

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

Views

Author

Alois P. Heinz, May 01 2017

Keywords

Comments

Each cycle is written with the smallest element first and cycles are arranged in increasing order of their first elements.

Crossrefs

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 *)