%I #45 Feb 21 2022 09:10:05
%S 1,1,5,20,85,400,2046,11226,65676,407787,2675410,18475311,133843405,
%T 1014271763,8019687099,66011609670,564494701167,5005880952390,
%U 45958055208576,436161412834300,4273045478169842,43160044390231165
%N Fourth-from-right diagonal of triangle A121207.
%C With leading 0 and offset 3: number of permutations beginning with 4321 and avoiding 1-23. - _Ralf Stephan_, Apr 25 2004
%C a(n) is the number of set partitions of {1,2,...,n+3} in which the last block has length 3; the blocks are arranged in order of their least element. - _Don Knuth_, Jun 12 2017
%H Seiichi Manyama, <a href="/A045499/b045499.txt">Table of n, a(n) for n = 0..573</a>
%H S. Kitaev, <a href="https://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], 2002.
%F a(n+1) = Sum_{k=0..n} binomial(n+3, k+3)*a(k). - _Vladeta Jovovic_, Nov 10 2003
%F With offset 3, e.g.f.: x^3 + exp(exp(x))/6 * int[0..x, t^3*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)^4. [_Paul D. Hanna_, Mar 23 2012]
%p A045499 := proc(n)
%p option remember ;
%p if n =0 then
%p 1 ;
%p else
%p add( binomial(n+2,k+3)*procname(k),k=0..n-1) ;
%p end if;
%p end proc: # _R. J. Mathar_, Jun 03 2014
%t a[0] = 1; a[n_] := a[n] = Sum[a[k]*Binomial[n+2, k+3], {k, 0, n-1}];
%t Table[a[n], {n, 0, 21}] (* _Jean-François Alcover_, Nov 20 2017 *)
%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)^4); polcoeff(A, n)} /* _Paul D. Hanna_, Mar 23 2012 */
%o (Python)
%o # The function Gould_diag is defined in A121207.
%o A045499_list = lambda size: Gould_diag(4, size)
%o print(A045499_list(24)) # _Peter Luschny_, Apr 24 2016
%Y Cf. A045500, A045501, A346059.
%Y Column k=3 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