OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..178
Index entries for linear recurrences with constant coefficients, signature (2,7).
FORMULA
a(n) = 2*a(n-1) + 7*a(n-2) for n > 1; a(0) = 1, a(1) = 7.
a(n) = ((2+3*sqrt(2))*(1+2*sqrt(2))^n + (2-3*sqrt(2))*(1-2*sqrt(2))^n)/4.
G.f.: (1+5*x)/(1-2*x-7*x^2).
a(n)/a(n-1) ~ 1 + 2*sqrt(2). - Kyle MacLean Smith, Dec 15 2019
E.g.f.: exp(x)*cosh(2*sqrt(2)*x) + 3*exp(x)*sinh(2*sqrt(2)*x)/sqrt(2). - Stefano Spezia, Dec 16 2019
From G. C. Greubel, Jul 18 2021: (Start)
a(n) = (i*sqrt(7))^(n-1)*(i*sqrt(7)*ChebyshevU(n, -i/sqrt(7)) + 5*ChebyshevU(n-1, -i/sqrt(7))).
a(n) = Sum_{j=0..floor(n/2)} binomial(n-k, k)*((7*n -12*k)/(n-k))*7^k*2^(n-2*k-1). (End)
MATHEMATICA
LinearRecurrence[{2, 7}, {1, 7}, 40] (* Harvey P. Dale, Jul 15 2012 *)
PROG
(Magma) Z<x>:=PolynomialRing(Integers()); N<r>:=NumberField(x^2-2); S:=[ ((2+3*r)*(1+2*r)^n+(2-3*r)*(1-2*r)^n)/4: n in [0..23] ]; [ Integers()!S[j]: j in [1..#S] ]; // Klaus Brockhaus, Aug 19 2009
(Sage) [(i*sqrt(7))^(n-1)*(i*sqrt(7)*chebyshev_U(n, -i/sqrt(7)) + 5*chebyshev_U(n-1, -i/sqrt(7))) for n in (0..40)] # G. C. Greubel, Jul 18 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Al Hakanson (hawkuu(AT)gmail.com), Aug 15 2009
EXTENSIONS
Edited and extended beyond a(5) by Klaus Brockhaus, Aug 19 2009
STATUS
approved