OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (-1,2,8).
FORMULA
a(n) = -a(n-1) +2*a(n-2) +8*a(n-3).
a(n) = (6*4^n+r^(n+1)+(16/r)^(n+1))/(7*2^n), where r=-3-sqrt(-7). - Bruno Berselli, Dec 12 2011
MATHEMATICA
LinearRecurrence[{-1, 2, 8}, {2, 6, -2}, 34] (* Bruno Berselli, Dec 12 2011 *)
PROG
(Maxima) makelist(expand((6*4^n+(-3-sqrt(-7))^(n+1)+(-3+sqrt(-7))^(n+1))/(7*2^n)), n, 1, 34); /* Bruno Berselli, Dec 12 2011 */
(Magma) I:=[2, 6, -2]; [n le 3 select I[n] else -Self(n-1)+2*Self(n-2)+8*Self(n-3): n in [1..40]]; // Vincenzo Librandi, Jul 12 2012
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Krishnamurthy Balasubraniam, Nov 19 2011
EXTENSIONS
Definition from R. J. Mathar, Nov 19 2011
STATUS
approved