%I M3540 #89 Feb 22 2023 18:32:02
%S 1,4,17,77,372,1915,10481,60814,372939,2409837,16360786,116393205,
%T 865549453,6713065156,54190360453,454442481041,3952241526188,
%U 35590085232519,331362825860749,3185554606447814,31581598272055879,322516283206446897
%N 3-Bell numbers: E.g.f.: exp(3*z + exp(z) - 1).
%C For further information, references, programs, etc. for r-Bell numbers see A005493. - _N. J. A. Sloane_, Nov 27 2013
%C From expansion of falling factorials (binomial transform of A005493).
%C Row sums of Sheffer triangle (exp(3*x), exp(x)-1). - _Wolfdieter Lang_, Sep 29 2011
%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H Vincenzo Librandi, <a href="/A005494/b005494.txt">Table of n, a(n) for n = 0..200</a>
%H Eldar Fischer, Johann A. Makowsky, and Vsevolod Rakita, <a href="https://arxiv.org/abs/2302.08265">MC-finiteness of restricted set partition functions</a>, arXiv:2302.08265 [math.CO], 2023.
%H R. Jakimczuk, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL14/Jakimczuk2/jakimczuk17.html">Successive Derivatives and Integer Sequences</a>, J. Int. Seq. 14 (2011) # 11.7.3.
%H J. W. Layman, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL4/LAYMAN/hankel.html">The Hankel Transform and Some of its Properties</a>, J. Integer Sequences, 4 (2001), #01.1.5.
%H Toufik Mansour and Mark Shattuck, <a href="http://www.emis.de/journals/INTEGERS/papers/l67/l67.Abstract.html">A recurrence related to the Bell numbers</a>, INTEGERS 11 (2011), #A67.
%H I. Mezo, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL14/Mezo/mezo9.html">The r-Bell numbers</a>, J. Int. Seq. 14 (2011) # 11.1.1.
%H J. Riordan, <a href="/A001861/a001861_1.pdf">Letter, Oct 31 1977</a>
%H N. J. A. Sloane, <a href="/transforms.txt">Transforms</a>
%H Earl Glen Whitehead Jr., <a href="http://dx.doi.org/10.1016/0097-3165(78)90061-4">Stirling number identities from chromatic polynomials</a>, J. Combin. Theory, A 24 (1978), 314-317.
%F a(n) = Sum_{i=0..n} 3^(n-i)*B(i)*binomial(n,i) where B(n) = Bell numbers A000110(n). - _Fred Lunnon_, Aug 04 2007
%F a(n) = exp(-1)*Sum_{k>=0} ((k+3)^n)/k!. - _Gerald McGarvey_, Jun 03 2004. May be rewritten as a(n) = Sum_{k>=3} (k^n*(k-1)*(k-2)/k!)/exp(1), which is a Dobinski-type relation for this sequence. - _Karol A. Penson_, Aug 18 2006
%F Define f_1(x), f_2(x), ... such that f_1(x) = x^2*e^x, f_{n+1}(x) = (d/dx)(x*f_n(x)), for n=2,3,.... Then a(n-1) = e^(-1)*f_n(1). - _Milan Janjic_, May 30 2008
%F Let A be the upper Hessenberg matrix of order n defined by: A[i,i-1]=-1, A[i,j]=binomial(j-1,i-1), (i <= j), and A[i,j]=0 otherwise. Then, for n >= 1, a(n) = (-1)^(n)charpoly(A,-3). - _Milan Janjic_, Jul 08 2010
%F a(n) = Sum_{k=3..n+3} A143495(n+3,k), n >= 0. - _Wolfdieter Lang_, Sep 29 2011
%F G.f.: 1/U(0) where U(k)= 1 - x*(k+4) - x^2*(k+1)/U(k+1); (continued fraction, 1-step). - _Sergei N. Gladkovskii_, Oct 11 2012
%F G.f.: Sum_{k>0} x^(k-1) / ((1 - 3*x) * (1 - 4*x) * ... * (1 - (k+2)*x)). - _Michael Somos_, Feb 26 2014
%F G.f.: Sum_{k>0} k * x^(k-1) / ((1 - 2*x) * (1 - 3*x) * ... * (1 - (k+1)*x)). - _Michael Somos_, Feb 26 2014
%F a(n) ~ exp(n/LambertW(n) - n - 1) * n^(n + 3) / LambertW(n)^(n + 7/2). - _Vaclav Kotesovec_, Jun 10 2020
%F a(0) = 1; a(n) = 3 * a(n-1) + Sum_{k=0..n-1} binomial(n-1,k) * a(k). - _Ilya Gutkovskiy_, Jul 02 2020
%F a(n) = Sum_{k=0..n} 4^k*A124323(n, k). - _Mélika Tebni_, Jun 10 2022
%e G.f. = 1 + 4*x + 17*x^2 + 77*x^3 + 372*x^4 + 1915*x^5 + 10481*x^6 + 60814*x^7 + ...
%p seq(add(3^(n-i)*combinat:-bell(i)*binomial(n,i),i=0..n), n=0..50); # _Robert Israel_, Dec 16 2014
%t Range[0, 40]! CoefficientList[Series[Exp[3 x + Exp[x] - 1], {x, 0, 40}], x] (* _Vincenzo Librandi_, Mar 04 2014 *)
%o (Magma)
%o A005494:= func< n | (&+[Binomial(n,j)*3^(n-j)*Bell(j): j in [0..n]]) >;
%o [A005494(n): n in [0..30]]; // _G. C. Greubel_, Dec 01 2022
%o (SageMath)
%o def A005494(n): return sum( 3^(n-j)*bell_number(j)*binomial(n,j) for j in range(n+1))
%o [A005494(n) for n in range(31)] # _G. C. Greubel_, Dec 01 2022
%Y Cf. A000110, A005493, A045379, A108087, A124323, A196834.
%Y A row or column of the array A108087.
%K nonn
%O 0,2
%A _N. J. A. Sloane_, _Simon Plouffe_