login
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.
14

%I #18 Feb 01 2015 09:46:05

%S 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,

%T 1,4,27,208,825,2556,5040,1,1,4,27,252,2325,10206,24409,40320,1,1,4,

%U 27,256,3025,31956,143521,347712,362880,1,1,4,27,256,3120,44406,520723,2313200,4794633,3628800

%N 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.

%H Alois P. Heinz, <a href="/A245405/b245405.txt">Antidiagonals n = 0..140, flattened</a>

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

%e Square array A(n,k) begins:

%e 0 : 1, 1, 1, 1, 1, 1, 1, ...

%e 1 : 1, 0, 1, 1, 1, 1, 1, ...

%e 2 : 2, 2, 2, 4, 4, 4, 4, ...

%e 3 : 6, 3, 9, 24, 27, 27, 27, ...

%e 4 : 24, 40, 76, 208, 252, 256, 256, ...

%e 5 : 120, 205, 825, 2325, 3025, 3120, 3125, ...

%e 6 : 720, 2556, 10206, 31956, 44406, 46476, 46650, ...

%p b:= proc(n, i, k) option remember; `if`(n=0 and i=0, 1,

%p `if`(i<1, 0, add(`if`(j=k, 0, b(n-j, i-1, k)*

%p binomial(n, j)), j=0..n)))

%p end:

%p A:= (n, k)-> b(n$2, k):

%p seq(seq(A(n, d-n), n=0..d), d=0..14);

%t 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 *)

%Y Column k=0-10 give: A000142, A231797, A245406, A245407, A245408, A245409, A245410, A245411, A245412, A245413, A245414.

%Y Main diagonal gives A061190.

%Y A(n,n+1) gives A000312.

%K nonn,tabl

%O 0,6

%A _Alois P. Heinz_, Jul 21 2014