OFFSET
0,1
COMMENTS
Lim_{n -> infinity} a(n + 1)/a(n) = 2 + phi = 3.6180339887..., where phi is the golden ratio (A001622).
LINKS
FORMULA
G.f.: (2 - 7*x)/(1 - 5*x + 5*x^2).
a(n) = ((5 + 2*sqrt(5))*((5 - sqrt(5))/2)^n + (5 - 2*sqrt(5))*((5 + sqrt(5))/2)^n)/5.
MATHEMATICA
Table[((5 + 2 Sqrt[5]) ((5 - Sqrt[5])/2)^n + (5 - 2 Sqrt[5]) ((5 + Sqrt[5])/2)^n)/5, {n, 0, 30}]
RecurrenceTable[{a[0] == 2, a[1] == 3, a[n] == 5 a[n - 1] - 5 a[n - 2]}, a, {n, 0, 30}] (* Bruno Berselli, Nov 23 2015 *)
PROG
(Magma) [n le 2 select n+1 else 5*Self(n-1)-5*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Nov 23 2015
(PARI) a(n)=([0, 1; -5, 5]^n*[2; 3])[1, 1] \\ Charles R Greathouse IV, Jul 26 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Ilya Gutkovskiy, Nov 21 2015
EXTENSIONS
Edited by Bruno Berselli, Nov 23 2015
STATUS
approved