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.

A019576 Place n distinguishable balls in n boxes (in n^n ways); let f(n,k) = number of ways that max in any box is k, for 1<=k<=n; sequence gives triangle of numbers f(n,k)/n.

Original entry on oeis.org

1, 1, 1, 2, 6, 1, 6, 45, 12, 1, 24, 420, 160, 20, 1, 120, 4800, 2450, 375, 30, 1, 720, 65520, 43050, 7560, 756, 42, 1, 5040, 1045170, 858480, 167825, 19208, 1372, 56, 1, 40320, 19126800, 19208000, 4110120, 516096, 43008, 2304, 72, 1
Offset: 1

Views

Author

Lee Corbin (lcorbin(AT)tsoft.com)

Keywords

Comments

T(n,k) is 1/n times the number of endofunctions on [n] such that the maximal cardinality of the nonempty preimages equals k. - Alois P. Heinz, May 23 2016

Examples

			:   1;
:   1,     1;
:   2,     6,     1;
:   6,    45,    12,    1;
:  24,   420,   160,   20,   1;
: 120,  4800,  2450,  375,  30,  1;
: 720, 65520, 43050, 7560, 756, 42, 1;
		

Crossrefs

Row sums give A000169.
Cf. A019575.

Programs

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

Formula

T(n,k) = A019575(n,k)/n.