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.

A245687 Number T(n,k) of endofunctions on [n] such that the minimal cardinality of the nonempty preimages equals k; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 2, 2, 0, 24, 0, 3, 0, 216, 36, 0, 4, 0, 2920, 200, 0, 0, 5, 0, 44100, 2250, 300, 0, 0, 6, 0, 799134, 22932, 1470, 0, 0, 0, 7, 0, 16429504, 342608, 3136, 1960, 0, 0, 0, 8, 0, 382625856, 4638384, 147168, 9072, 0, 0, 0, 0, 9, 0, 9918836100, 79610850, 1522800, 18900, 11340, 0, 0, 0, 0, 10
Offset: 0

Views

Author

Alois P. Heinz, Jul 29 2014

Keywords

Comments

T(0,0) = 1 by convention.

Examples

			Triangle T(n,k) begins:
  1;
  0,        1;
  0,        2,      2;
  0,       24,      0,    3;
  0,      216,     36,    0,    4;
  0,     2920,    200,    0,    0,  5;
  0,    44100,   2250,  300,    0,  0,  6;
  0,   799134,  22932, 1470,    0,  0,  0,  7;
  0, 16429504, 342608, 3136, 1960,  0,  0,  0,  8;
  ...
		

Crossrefs

T(n,1) = n*A241581(n) for n>0.
Rows sums give A000312.
Main diagonal gives A028310.
T(2n,n) gives A273325.
Cf. A019575 (the same for maximal cardinality).

Programs

  • Maple
    b:= proc(n, i, k) option remember; `if`(n=0, 1, `if`(i<1, 0,
          b(n, i-1, k) +add(b(n-j, i-1, k)/j!, j=k..n)))
        end:
    T:= (n, k)-> `if`(k=0, `if`(n=0, 1, 0), `if`(k=n, n,
        `if`(k>=(n+1)/2, 0, n!*(b(n$2, k)-b(n$2, k+1))))):
    seq(seq(T(n, k), k=0..n), n=0..12);
  • Mathematica
    b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i<1, 0, b[n, i-1, k] + Sum[b[n-j, i-1, k]/j!, {j, k, n}]]]; T[n_, k_] := If[k == 0, If[n == 0, 1, 0], If[k == n, n, If[k >= (n+1)/2, 0, n!*(b[n, n, k] - b[n, n, k+1])]]]; Table[Table[T[n, k], {k, 0, n}], {n, 0, 12}] // Flatten (* Jean-François Alcover, Feb 02 2015, after Alois P. Heinz *)
Showing 1-1 of 1 results.