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.

A246191 Number of endofunctions on [n] where the smallest cycle length equals 4.

Original entry on oeis.org

6, 120, 2160, 41160, 861420, 19949328, 510320160, 14348862000, 440879024520, 14716697990280, 530761366078944, 20577610843203960, 853717568817968400, 37746072677473752480, 1771994498414094109440, 88032162789004128733152, 4614300279345812506938720
Offset: 4

Views

Author

Alois P. Heinz, Aug 18 2014

Keywords

Crossrefs

Column k=4 of A246049.

Programs

  • Maple
    with(combinat):
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i>n, 0,
          add((i-1)!^j*multinomial(n, n-i*j, i$j)/j!*
          b(n-i*j, i+1), j=0..n/i)))
        end:
    A:= (n, k)-> add(binomial(n-1, j-1)*n^(n-j)*b(j, k), j=0..n):
    a:= n-> A(n, 4) -A(n, 5):
    seq(a(n), n=4..25);
  • Mathematica
    multinomial[n_, k_List] := n!/Times @@ (k!);
    b[n_, i_] := b[n, i] = If[n==0, 1, If[i>n, 0, Sum[(i - 1)!^j multinomial[n, Join[{n - i*j}, Table[i, {j}]]]/j! b[n - i*j, i + 1], {j, 0, n/i}]]];
    A[n_, k_] := Sum[Binomial[n - 1, j - 1] n^(n - j) b[j, k], {j, 0, n}];
    a[n_] := A[n, 4] - A[n, 5];
    a /@ Range[4, 25] (* Jean-François Alcover, Dec 28 2020, after Alois P. Heinz *)

Formula

a(n) ~ (exp(-11/6) - exp(-25/12)) * n^n. - Vaclav Kotesovec, Aug 21 2014