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.

A245405 Number A(n,k) of endofunctions on [n] such that no element has a preimage of cardinality k; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 0, 2, 1, 1, 2, 6, 1, 1, 2, 3, 24, 1, 1, 4, 9, 40, 120, 1, 1, 4, 24, 76, 205, 720, 1, 1, 4, 27, 208, 825, 2556, 5040, 1, 1, 4, 27, 252, 2325, 10206, 24409, 40320, 1, 1, 4, 27, 256, 3025, 31956, 143521, 347712, 362880, 1, 1, 4, 27, 256, 3120, 44406, 520723, 2313200, 4794633, 3628800
Offset: 0

Views

Author

Alois P. Heinz, Jul 21 2014

Keywords

Examples

			Square array A(n,k) begins:
0 :   1,    1,     1,     1,     1,     1,     1, ...
1 :   1,    0,     1,     1,     1,     1,     1, ...
2 :   2,    2,     2,     4,     4,     4,     4, ...
3 :   6,    3,     9,    24,    27,    27,    27, ...
4 :  24,   40,    76,   208,   252,   256,   256, ...
5 : 120,  205,   825,  2325,  3025,  3120,  3125, ...
6 : 720, 2556, 10206, 31956, 44406, 46476, 46650, ...
		

Crossrefs

Main diagonal gives A061190.
A(n,n+1) gives A000312.

Programs

  • Maple
    b:= proc(n, i, k) option remember; `if`(n=0 and i=0, 1,
          `if`(i<1, 0, add(`if`(j=k, 0, b(n-j, i-1, k)*
           binomial(n, j)), j=0..n)))
        end:
    A:= (n, k)-> b(n$2, k):
    seq(seq(A(n, d-n), n=0..d), d=0..14);
  • Mathematica
    nn = n; f[m_]:=Flatten[Table[m[[j, i - j + 1]], {i, 1, Length[m]}, {j, 1, i}]]; f[Transpose[Table[Prepend[Table[n! Coefficient[Series[(Exp[x] -x^k/k!)^n, {x, 0, nn}],x^n], {n, 1, 10}], 1], {k, 0, 10}]]] (* Geoffrey Critzer, Jan 31 2015 *)

Formula

A(n,k) = n! * [x^n] (exp(x)-x^k/k!)^n.