OFFSET
0,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,4).
FORMULA
a(n) = 2^n*Sum_{k=0..n} A193737(n,k)/2^k.
a(n) = [x^n] (1 - 4*x^2)/(1 - x*(3 + 4*x)).
a(n) = n! [x^n] (3/5)*exp(-x)*(exp(5*x) - 1) + 1.
a(n) = 4*a(n-2) + 3*a(n-1).
a(n) = 3*A015521(n), n>0. - R. J. Mathar, Aug 19 2022
MAPLE
gf := (4*x^2 - 1)/(x*(4*x + 3) - 1): ser := series(gf, x, 32):
seq(coeff(ser, x, n), n=0.. 25);
# Alternative:
gf:= (3/5)*exp(-x)*(exp(5*x) - 1) + 1: ser := series(gf, x, 32):
seq(n!*coeff(ser, x, n), n=0.. 25);
# Or:
a := proc(n) option remember; if n < 3 then return [1, 3, 9][n + 1] fi;
4*a(n-2) + 3*a(n-1) end: seq(a(n), n=0..25);
MATHEMATICA
LinearRecurrence[{3, 4}, {1, 3, 9}, 31] (* G. C. Greubel, Sep 14 2023 *)
PROG
(Magma) [1] cat [3*(4^n -(-1)^n)/5: n in [1..30]]; // G. C. Greubel, Sep 14 2023
(SageMath) [3*(4^n -(-1)^n)//5 + int(n==0) for n in range(31)] # G. C. Greubel, Sep 14 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Peter Luschny, Jan 10 2020
STATUS
approved