OFFSET
0,2
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,-1,-1).
FORMULA
a(n) = 2*a(n-1) + a(n-2) + 4; a(0)=1, a(1)=6.
a(n) = ((6 + 5*sqrt(2))*(1 + sqrt(2))^n + (6 - 5*sqrt(2))*(1 - sqrt(2))^n)/4 - 2. [Corrected by Stefano Spezia, May 26 2024]
From Colin Barker, Sep 19 2012: (Start)
a(n) = 3*a(n-1) - a(n-2) - a(n-3).
G.f.: (1+3*x)/((1-x)*(1-2*x-x^2)). (End)
a(n) = 2*Pell(n) + 3*Pell(n+1) - 2, where Pell = A000129. - Vladimir Reshetnikov, Sep 27 2016
E.g.f.: exp(x)*(6*cosh(sqrt(2)*x) + 5*sqrt(2)*sinh(sqrt(2)*x) - 4)/2. - Stefano Spezia, May 26 2024
MATHEMATICA
Accumulate[LinearRecurrence[{2, 1}, {1, 5}, 30]] (* Harvey P. Dale, May 23 2012 *)
LinearRecurrence[{3, -1, -1}, {1, 6, 17}, 26] (* Ray Chandler, Aug 03 2015 *)
Table[2 Fibonacci[n, 2] + 3 Fibonacci[n + 1, 2] - 2, {n, 0, 10}] (* Vladimir Reshetnikov, Sep 27 2016 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
EXTENSIONS
Corrected and extended by T. D. Noe, Nov 07 2006
STATUS
approved