OFFSET
0,1
FORMULA
E.g.f.: 2*(1 + exp(x))/(1 + exp(x) + exp(2*x) - exp(3*x)).
PROG
(SageMath)
def a(m):
if m==0:
return 2
else:
return (-1)^m+(-2)^m+1/2*sum([(1-(-2)^j-(-1)^j)*binomial(m, j)*a(m-j) for j in [1, .., m]])
list(a(m) for m in [0, .., 20])
(SageMath)
f=2*(1+e^x)/(1+e^x+e^(2*x)-e^(3*x))
print([(diff(f, x, i)).subs(x=0) for i in [0, .., 20]])
(PARI) seq(n)={my(p=exp(x + O(x*x^n))); Vec(serlaplace(2*(1 + p)/(1 + p + p^2 - p^3)))} \\ Andrew Howroyd, Feb 26 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Prabha Sivaramannair, Feb 26 2024
STATUS
approved