OFFSET
0,2
FORMULA
a(0) = 1, a(n) = Sum_{j=1..n} (1-(-2)^j)*binomial(n,j)*a(n-j) for n > 0.
a(0) = 1, a(n) = 2^n + Sum_{j=1..n} (3^j-2^j)*binomial(n,j)*a(n-j) for n > 0.
E.g.f.: exp(2*x)/(1 + exp(2*x) - exp(3*x)).
MATHEMATICA
nn = 17; a[0] = 1; Do[Set[a[n], 2^n + Sum[(3^j - 2^j)*Binomial[n, j]*a[n - j], {j, n}]], {n, nn}]; Array[a, nn + 1, 0] (* Michael De Vlieger, Apr 19 2024 *)
PROG
(SageMath)
def a(n):
if n==0:
return 1
else:
return sum([(1-(-2)^j)*binomial(n, j)*a(n-j) for j in [1, .., n]])
list(a(n) for n in [0, .., 20])
(SageMath)
f= e^(2*x)/(1 + e^(2*x) - e^(3*x))
print([(diff(f, x, i)).subs(x=0) for i in [0, .., 20]])
CROSSREFS
KEYWORD
nonn
AUTHOR
Prabha Sivaramannair, Apr 15 2024
STATUS
approved