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,-2).
FORMULA
a(0) = 0, a(1) = 3, a(n+1) = 2*a(n) + 4, for n >= 1.
a(n) = 7*2^(n-1) - 4, n >= 1.
G.f.: x*(x + 3)/((x - 1)*(2*x - 1)). - Chai Wah Wu, Jul 24 2020
MATHEMATICA
Join[{0}, NestList[2#+4&, 3, 30]] (* Harvey P. Dale, Nov 08 2013 *)
Join[{0}, Table[7*2^(n-1) -4, {n, 50}]] (* G. C. Greubel, Sep 03 2018 *)
PROG
(PARI) concat([0], vector(50, n, 7*2^(n-1) -4)) \\ G. C. Greubel, Sep 03 2018
(Magma) [0] cat [7*2^(n-1) -4: n in [1..50]]; // G. C. Greubel, Sep 03 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Asher Auel, Dec 13 1999
STATUS
approved