OFFSET
0,2
FORMULA
a(n) = 1 + Sum_{k=1..n} (3^k - 1) * binomial(n,k) * a(n-k) for n > 0.
E.g.f.: exp(x)/(1 + exp(x) - exp(3*x)). - Vaclav Kotesovec, Feb 01 2024
MATHEMATICA
nmax = 20; CoefficientList[Series[E^x/(1 + E^x - E^(3*x)), {x, 0, nmax}], x]*
Range[0, nmax]! (* Vaclav Kotesovec, Feb 01 2024*)
PROG
(SageMath)
def a(m):
if m==0:
return 1
else:
return 1+sum([(3^j-1)*binomial(m, j)*a(m-j) for j in [1, .., m]])
list(a(m) for m in [1, .., 50])
CROSSREFS
KEYWORD
nonn
AUTHOR
Prabha Sivaramannair, Feb 01 2024
STATUS
approved