(MAGMAMagma) [ n eq 1 select 5 else Self(n-1)+Fibonacci(n): n in [1..40] ]; // Klaus Brockhaus, Jan 31 2011
(MAGMAMagma) [ n eq 1 select 5 else Self(n-1)+Fibonacci(n): n in [1..40] ]; // Klaus Brockhaus, Jan 31 2011
editing
approved
proposed
approved
editing
proposed
5, 6, 8, 11, 16, 24, 37, 58, 92, 147, 236, 380, 613, 990, 1600, 2587, 4184, 6768, 10949, 17714, 28660, 46371, 75028, 121396, 196421, 317814, 514232, 832043, 1346272, 2178312, 3524581, 5702890, 9227468, 14930355, 24157820, 39088172, 63245989, 102334158
a(n) = a(n-1) + Fibonacci(n), a(1)=5.
<a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (2,0,-1).
a(n) = 5 + A168193(n)/2.
From R. J. Mathar Dec 04 2009: (Start)
a(n) = 2*a(n-1) - a(n-3) = 3 + A000045(n+2). G.f.: x*(-5+4*x+4*x^2)/((1-x)*(x^2+x-1)). - R. J. Mathar, Dec 04 2009
G.f.: x*(-5+4*x+4*x^2) / ((1-x)*(x^2+x-1)).
(End)
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
(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
approved
editing
<a href="/index/Rec">Index to sequences with entries for linear recurrences with constant coefficients</a>, signature (2,0,-1).
<a href="/index/Rea#recLCCRec">Index to sequences with linear recurrences with constant coefficients</a>, signature (2,0,-1).
RecurrenceTable[{a[1]==5, a[n]==a[n-1]+Fibonacci[n]}, a[n], {n, 40}] (* or *) LinearRecurrence[{2, 0, -1}, {5, 6, 8}, 40] (* From _Harvey P. Dale, _, Jul 20 2011 *)