%I #45 Feb 21 2022 09:11:10
%S 1,1,6,27,125,635,3488,20425,126817,831915,5744784,41618459,315388311,
%T 2493721645,20526285716,175529425815,1556577220651,14290644428279,
%U 135624265589086,1328702240382589,13420603191219111,139592874355534071
%N Fifth-from-right diagonal of triangle A121207.
%C With leading 0 and offset 4: number of permutations beginning with 54321 and avoiding 1-23. - _Ralf Stephan_, Apr 25 2004
%C a(n) is the number of set partitions of {1,2,...,n+4} in which the last block has length 4: the blocks are arranged in order of their least element. - _Don Knuth_, Jun 12 2017
%D See also references under sequence A040027.
%H Seiichi Manyama, <a href="/A045500/b045500.txt">Table of n, a(n) for n = 0..573</a>
%H S. Kitaev, <a href="http://www.mat.univie.ac.at/~slc/wpapers/s48kitaev.html">Generalized pattern avoidance with additional restrictions</a>, Sem. Lothar. Combinat. B48e (2003).
%H S. Kitaev and T. Mansour, <a href="https://arxiv.org/abs/math/0205182">Simultaneous avoidance of generalized patterns</a>, arXiv:math/0205182 [math.CO], 2014.
%F a(n+1) = Sum_{k=0..n} binomial(n+4, k+4)*a(k). - _Vladeta Jovovic_, Nov 10 2003
%F With offset 4, e.g.f.: x^4 + exp(exp(x))/24 * int[0..x, t^4*exp(-exp(t)+t) dt]. - _Ralf Stephan_, Apr 25 2004
%F O.g.f. satisfies: A(x) = 1 + x*A( x/(1-x) ) / (1-x)^5. - _Paul D. Hanna_, Mar 23 2012
%t a[0] = a[1] = 1; a[n_] := a[n] = Sum[Binomial[n+3, k+4]*a[k], {k, 0, n-1}];
%t Table[a[n], {n, 0, 21}] (* _Jean-François Alcover_, Jul 14 2018, after _Vladeta Jovovic_ *)
%o (PARI) {a(n)=local(A=1+x); for(i=1, n, A=1+x*subst(A, x, x/(1-x+x*O(x^n)))/(1-x)^5); polcoeff(A, n)} /* Paul D. Hanna, Mar 23 2012 */
%o (Python)
%o # The function Gould_diag is defined in A121207.
%o A045500_list = lambda size: Gould_diag(5, size)
%o print(A045500_list(24)) # _Peter Luschny_, Apr 24 2016
%Y Cf. A040027, A045499, A045501, A121207, A346060.
%Y Column k=4 of A124496.
%K easy,nonn
%O 0,3
%A _Henry Gould_
%E More terms from _Vladeta Jovovic_, Nov 10 2003
%E Entry revised by _N. J. A. Sloane_, Dec 11 2006