OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..250
Index entries for linear recurrences with constant coefficients, signature (2,0,-1).
FORMULA
a(n) = 5 + A168193(n)/2.
a(n) = 2*a(n-1) - a(n-3) = 3 + A000045(n+2). - R. J. Mathar Dec 04 2009
G.f.: x*(-5+4*x+4*x^2) / ((1-x)*(x^2+x-1)). - R. J. Mathar Dec 04 2009
a(n) = 3 + (2^(-1-n)*((1-sqrt(5))^n*(-3+sqrt(5)) + (1+sqrt(5))^n*(3+sqrt(5)))) / sqrt(5). - Colin Barker, Apr 20 2017
EXAMPLE
n=2: a(1)+Fibonacci(2) = 5+1 = 6.
n=3: a(2)+Fibonacci(3) = 6+2 = 8.
MATHEMATICA
RecurrenceTable[{a[1]==5, a[n]==a[n-1]+Fibonacci[n]}, a[n], {n, 40}] (* or *) LinearRecurrence[{2, 0, -1}, {5, 6, 8}, 40] (* Harvey P. Dale, Jul 20 2011 *)
PROG
(Magma) [ n eq 1 select 5 else Self(n-1)+Fibonacci(n): n in [1..40] ]; // Klaus Brockhaus, Jan 31 2011
(PARI) Vec((5 - 4*x - 4*x^2) / ((1 - x)*(1 - x - x^2)) + O(x^40)) \\ Colin Barker, Apr 20 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Geoff Ahiakwo, Dec 03 2009
STATUS
approved