A324805 a(n) is the number of endofunctions on a set of size n with preimage constraint {0, 1, 2, 3, 4, 5}.
1, 1, 4, 27, 256, 3125, 46650, 823242, 16765784, 387012024, 9985309740, 284765293890, 8894836233360, 302004807340236, 11074484342033112, 436189649979463380, 18365270213907096480, 823145873249916696480, 39130443293729571463680, 1966482487351260975960864
Offset: 0
Links
- Benjamin Otto, Coalescence under Preimage Constraints, arXiv:1903.00542 [math.CO], 2019, Corollaries 5.6 and 7.8.
Crossrefs
Column k=5 of A306800; see that entry for sequences related to other preimage constraints constructions.
Programs
-
Maple
b:= proc(n, i) option remember; `if`(n=0 and i=0, 1, `if`(i<1, 0, add(b(n-j, i-1)*binomial(n, j), j=0..min(5, n)))) end: a:= n-> b(n$2): seq(a(n), n=0..20); # Alois P. Heinz, Apr 01 2019
-
Mathematica
b[n_, i_] := b[n, i] = If[n == 0 && i == 0, 1, If[i<1, 0, Sum[b[n-j, i-1]* Binomial[n, j], {j, 0, Min[5, n]}]]]; a[n_] := b[n, n]; Table[a[n], {n, 0, 20}] (* Jean-François Alcover, May 31 2019, after Alois P. Heinz *)
-
Python
# print first num_entries entries in the sequence 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))
Formula
a(n) = n! * [x^n] e_5(x)^n, where e_k(x) is the truncated exponential 1 + x+ x^2/2! + ... + x^k/k!. The link above yields explicit constants c_k, r_k so that the columns are asymptotically c_5 * n^(-1/2) * r_5^-n.
Comments