OFFSET
0,2
LINKS
Paolo Xausa, Table of n, a(n) for n = 0..500
H. W. Gould and J. Quaintance, A linear binomial recurrence and the Bell numbers and polynomials, Applic. Anal. Discr. Math 1 (2007) 371-385.
FORMULA
a(0) = 1, a(1) = 3; a(n) = Sum_{k=1..n} binomial(n-1,k-1) * a(n-k). - Ilya Gutkovskiy, Jul 10 2020
MAPLE
A038559 := proc(n)
2*A040027(n-1)+combinat[bell](n) ;
end proc: # R. J. Mathar, Dec 20 2013
alias(PS = ListTools:-PartialSums):
A038559List := proc(len) local a, k, P, T; a := 3; P := [1]; T := [1];
for k from 1 to len-1 do
T := [op(T), a]; P := PS([a, op(P)]); a := P[-1] od;
T end: A038559List(25); # Peter Luschny, Mar 28 2022
MATHEMATICA
a[0] = 1; a[1] = 3; a[n_] := a[n] = Sum[Binomial[n - 1, k - 1]*a[n - k], {k, n}];
Array[a, 30, 0] (* Paolo Xausa, Sep 17 2024 *)
Module[{a = 3, p = {1}}, Join[{1, a}, Table[a = Last[p = Accumulate[Prepend[p, a]]], 28]]] (* Paolo Xausa, Sep 17 2024, after Peter Luschny *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
STATUS
approved