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.

Showing 1-1 of 1 results.

A362362 Number of permutations of [n] such that each cycle contains its length as an element.

Original entry on oeis.org

1, 1, 1, 3, 8, 36, 174, 1104, 7440, 62640, 545040, 5649840, 60681600, 748621440, 9518342400, 136758585600, 2009451628800, 32848492723200, 549241915622400, 10066913176320000, 188293339922688000, 3832031198451456000, 79291640831090688000, 1771146970953744384000
Offset: 0

Views

Author

Alois P. Heinz, Jul 05 2023

Keywords

Comments

The cycle lengths are distinct as a consequence of the definition.

Examples

			a(3) = 3: (123), (132), (1)(23).
a(4) = 8: (1234), (1243), (1324), (1342), (1423), (1432), (1)(234), (1)(243).
		

Crossrefs

Programs

  • Maple
    a:= n-> add((n-nops(p))!, p=select(l-> nops(l)=
            nops({l[]}), combinat[partition](n))):
    seq(a(n), n=0..24);
    # second Maple program:
    b:= proc(n, i, p) option remember; `if`(i*(i+1)/2 b(n$3):
    seq(a(n), n=0..24);
  • Mathematica
    b[n_, i_, p_] := b[n, i, p] = If[i*(i + 1)/2 < n, 0, If[n == 0, p!, b[n, i - 1, p] + b[n - i, Min[n - i, i - 1], p - 1]]];
    a[n_] := b[n, n, n];
    Table[a[n], {n, 0, 24}] (* Jean-François Alcover, Nov 15 2023, from second Maple program *)
Showing 1-1 of 1 results.