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.

A324805 a(n) is the number of endofunctions on a set of size n with preimage constraint {0, 1, 2, 3, 4, 5}.

This page as a plain text file.
%I A324805 #17 Oct 03 2024 14:07:39
%S A324805 1,1,4,27,256,3125,46650,823242,16765784,387012024,9985309740,
%T A324805 284765293890,8894836233360,302004807340236,11074484342033112,
%U A324805 436189649979463380,18365270213907096480,823145873249916696480,39130443293729571463680,1966482487351260975960864
%N A324805 a(n) is the number of endofunctions on a set of size n with preimage constraint {0, 1, 2, 3, 4, 5}.
%C A324805 A preimage constraint is a set of nonnegative integers such that the size of the inverse image of any element is one of the values in that set.
%C A324805 Thus, the n-th term of the sequence is the number of endofunctions on a set of size n such that each preimage has at most 5 elements. Equivalently, it is the number of n-letter words from an n-letter alphabet such that no letter appears more than 5 times.
%H A324805 Benjamin Otto, <a href="https://arxiv.org/abs/1903.00542">Coalescence under Preimage Constraints</a>, arXiv:1903.00542 [math.CO], 2019, Corollaries 5.6 and 7.8.
%F A324805 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.
%p A324805 b:= proc(n, i) option remember; `if`(n=0 and i=0, 1, `if`(i<1, 0,
%p A324805       add(b(n-j, i-1)*binomial(n, j), j=0..min(5, n))))
%p A324805     end:
%p A324805 a:= n-> b(n$2):
%p A324805 seq(a(n), n=0..20);  # _Alois P. Heinz_, Apr 01 2019
%t A324805 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]}]]];
%t A324805 a[n_] := b[n, n];
%t A324805 Table[a[n], {n, 0, 20}] (* _Jean-François Alcover_, May 31 2019, after _Alois P. Heinz_ *)
%o A324805 (Python)
%o A324805 # print first num_entries entries in the sequence
%o A324805 import math, sympy; x=sympy.symbols('x')
%o A324805 k=5; num_entries = 64
%o A324805 P=range(k+1); eP=sum([x**d/math.factorial(d) for d in P]); r = [1]; curr_pow = 1
%o A324805 for term in range(1,num_entries):
%o A324805     curr_pow=(curr_pow*eP).expand()
%o A324805     r.append(curr_pow.coeff(x**term)*math.factorial(term))
%Y A324805 Column k=5 of A306800; see that entry for sequences related to other preimage constraints constructions.
%K A324805 easy,nonn
%O A324805 0,3
%A A324805 _Benjamin Otto_, Mar 25 2019