OFFSET
1,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (3,1,-5,-1,1).
FORMULA
From G. C. Greubel, Oct 24 2018: (Start)
a(n) = 3*a(n-1) + a(n-2) - 5*a(n-3) - a(n-4) + a(n-5).
G.f.: x*(1 - 2*x - x^2)/(1 - 3*x - x^2 + 5*x^3 + x^4 - x^5). (End)
a(n) = (Lucas(2*n - 1) + 5*Fibonacci(n + 1) - 4*(-1)^n)/10. - Greg Dresden, Jan 01 2021
EXAMPLE
Fibonacci(0) to Fibonacci(10) are 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55. Hence a(1) = 0+1 = 1, a(2) = 1, a(3) = 1+2 = 3, a(6) = 5+6+7+8 = 26, a(8) = 13+14+15+16+17+18+19+20+21 = 153.
MATHEMATICA
Table[Sum[k, {k, Fibonacci[n - 1], Fibonacci[n]}], {n, 1, 50}] (* or *) LinearRecurrence[{3, 1, -5, -1, 1}, {1, 1, 3, 5, 12}, 50] (* G. C. Greubel, Oct 24 2018 *)
Total[Range[#[[1]], #[[2]]]]&/@Partition[Fibonacci[Range[0, 30]], 2, 1] (* Harvey P. Dale, Feb 13 2023 *)
PROG
(Magma) [&+[Fibonacci(n-1)..Fibonacci(n)]: n in [1..30]]; // Klaus Brockhaus, Jun 25 2009
(Magma) m:=50; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!(x*(1-2*x-x^2)/(1-3*x-x^2+5*x^3+x^4-x^5))); // G. C. Greubel, Oct 24 2018
(PARI) for(n=1, 50, print1(sum(k=fibonacci(n-1), fibonacci(n), k), ", ")) \\ G. C. Greubel, Oct 24 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Juri-Stepan Gerasimov, Jun 18 2009
EXTENSIONS
Edited, corrected (a(2)=2 replaced by 1, a(13)=15310 replaced by 16965) and extended beyond a(13) by Klaus Brockhaus, Jun 25 2009
Definition clarified by Harvey P. Dale, Feb 13 2023
STATUS
approved