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
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, ...
Column k=0-10 give:
A000142,
A231797,
A245406,
A245407,
A245408,
A245409,
A245410,
A245411,
A245412,
A245413,
A245414.
-
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);
-
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 *)
A306800
Square array whose entry A(n,k) is the number of endofunctions on a set of size n with preimage constraint {0,1,...,k}, for n >= 0, k >= 0, read by descending antidiagonals.
Original entry on oeis.org
1, 1, 0, 1, 1, 0, 1, 1, 2, 0, 1, 1, 4, 6, 0, 1, 1, 4, 24, 24, 0, 1, 1, 4, 27, 204, 120, 0, 1, 1, 4, 27, 252, 2220, 720, 0, 1, 1, 4, 27, 256, 3020, 29520, 5040, 0, 1, 1, 4, 27, 256, 3120, 44220, 463680, 40320, 0, 1, 1, 4, 27, 256, 3125, 46470, 765030, 8401680, 362880, 0
Offset: 0
Array begins:
1 1 1 1 1 ...
0 1 1 1 1 ...
0 2 4 4 4 ...
0 6 24 27 27 ...
0 24 204 252 256 ...
0 120 2220 3020 3120 ...
0 720 29520 44220 46470 ...
...
Similar array for preimage condition {i>=0 | i!=k}:
A245413.
Number of functions with preimage condition given by the even nonnegative integers:
A209289.
Sum over all k of the number of functions with preimage condition {0,k}:
A231812.
-
b:= proc(n, i, k) option remember; `if`(n=0 and i=0, 1, `if`(i<1, 0,
add(b(n-j, i-1, k)*binomial(n, j), j=0..min(k, n))))
end:
A:= (n, k)-> b(n$2, k):
seq(seq(A(n, d-n), n=0..d), d=0..12); # Alois P. Heinz, Apr 05 2019
-
b[n_, i_, k_] := b[n, i, k] = If[n==0 && i==0, 1, If[i<1, 0, Sum[b[n-j, i-1, k] Binomial[n, j], {j, 0, Min[k, n]}]]];
A[n_, k_] := b[n, n, k];
Table[A[n, d-n], {d, 0, 12}, {n, 0, d}] // Flatten (* Jean-François Alcover, May 29 2019, after Alois P. Heinz *)
-
# print first num_entries entries in column k
import math, sympy; x=sympy.symbols('x')
k=5; num_entries = 64
P=range(k+1); eP=sum([x**d/math.factorial(d) for d in P]); r = [1]; curr_pow = 1
for term in range(1,num_entries):
curr_pow=(curr_pow*eP).expand()
r.append(curr_pow.coeff(x**term)*math.factorial(term))
print(r)
Showing 1-2 of 2 results.
Comments