OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..500
Index entries for linear recurrences with constant coefficients, signature (7,-14,8)
FORMULA
a(n) = (2-7*2^n+7*4^n)/2.
G.f.: (1+x+x^2)/((1-x)*(1-2*x)*(1-4*x)).
MAPLE
MATHEMATICA
LinearRecurrence[{7, -14, 8}, {1, 8, 43}, 30] (* Harvey P. Dale, Sep 18 2022 *)
PROG
(PARI) {m=23; v=concat([1, 8], vector(m-2)); for(n=3, m, v[n]=6*v[n-1]-8*v[n-2]+3); v}
(Magma) [(2-7*2^n+7*4^n)/2: n in [0..30]]; // Vincenzo Librandi, Jul 18 2011
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Klaus Brockhaus, Dec 09 2009
STATUS
approved