OFFSET
1,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (4,20,-32,-96).
FORMULA
a(n) = 4*a(n-1) + 20*a(n-2) - 32*a(n-3) - 96*a(n-4) for n > 4.
From Bruno Berselli, Aug 04 2011: (Start)
G.f.: x*(1+4*x-4*x^2)/((1+2*x)*(1-6*x)*(1-8*x^2)).
a(n) = 2^(n-2)*(3^n-1+((-1)^n-1)*(sqrt(2)^(n-1)-1)).
a(2k+1) = 2^(2k-1)*(3*9^k-2*2^k+1), a(2k) = 4^(k-1)*(9^k-1). (End)
MATHEMATICA
LinearRecurrence[{4, 20, -32, -96}, {1, 8, 48, 320}, 30] (* Harvey P. Dale, Jun 11 2011 *)
PROG
(Magma) [Floor(2^(n-2)*(3^n-1+((-1)^n-1)*(Sqrt(2)^(n-1)-1))): n in [1..30]]; // Vincenzo Librandi, Aug 05 2011
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Gary W. Adamson, Jun 11 2004
EXTENSIONS
Edited, corrected and extended by Robert G. Wilson v, Jun 16 2004
Meaningful name from Joerg Arndt, Dec 26 2022
STATUS
approved