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.

A290961 Number of endofunctions on [n] such that the LCM of their cycle lengths equals n.

Original entry on oeis.org

1, 1, 2, 6, 24, 840, 720, 5040, 40320, 59814720, 3628800, 83701537920, 479001600, 26980643289600, 2642646473026560, 1307674368000, 20922789888000, 41837259585747225600, 6402373705728000, 598354114828973074790400, 18160977780223038067507200
Offset: 1

Views

Author

Alois P. Heinz, Aug 15 2017

Keywords

Crossrefs

Main diagonal of A222029.
Cf. A074351 (the same for permutations).

Programs

  • Maple
    b:= proc(n, m) option remember; `if`(n=0, x^m, add((j-1)!*
          b(n-j, ilcm(m, j))*binomial(n-1, j-1), j=1..n))
        end:
    a:= n-> add(coeff(b(j, 1), x, n)*n^(n-j)*binomial(n-1, j-1), j=0..n):
    seq(a(n), n=1..25);
  • Mathematica
    b[n_, m_] := b[n, m] = If[n == 0, x^m, Sum[(j - 1)!*
         b[n - j, LCM[m, j]]*Binomial[n - 1, j - 1], {j, 1, n}]];
    a[n_] := Sum[Coefficient[b[j, 1], x, n]*n^(n-j)*Binomial[n-1, j-1], {j, 0, n}];
    Table[a[n], {n, 1, 25}] (* Jean-François Alcover, Mar 07 2022, after Alois P. Heinz *)

Formula

a(n) = A222029(n,n).