%I #27 Feb 13 2023 19:43:19
%S 1,1,3,5,12,26,63,153,385,979,2520,6524,16965,44225,115479,301833,
%T 789412,2065414,5405235,14147705,37033701,96946631,253795248,
%U 664421400,1739440297,4553853121,11922044043,31212157613,81714232380,213930221714
%N Sum of all numbers from and including Fibonacci(n-1) to and including Fibonacci(n).
%H G. C. Greubel, <a href="/A161762/b161762.txt">Table of n, a(n) for n = 1..1000</a>
%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (3,1,-5,-1,1).
%F From _G. C. Greubel_, Oct 24 2018: (Start)
%F a(n) = 3*a(n-1) + a(n-2) - 5*a(n-3) - a(n-4) + a(n-5).
%F G.f.: x*(1 - 2*x - x^2)/(1 - 3*x - x^2 + 5*x^3 + x^4 - x^5). (End)
%F a(n) = (Lucas(2*n - 1) + 5*Fibonacci(n + 1) - 4*(-1)^n)/10. - _Greg Dresden_, Jan 01 2021
%e 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.
%t 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 *)
%t Total[Range[#[[1]],#[[2]]]]&/@Partition[Fibonacci[Range[0,30]],2,1] (* _Harvey P. Dale_, Feb 13 2023 *)
%o (Magma) [&+[Fibonacci(n-1)..Fibonacci(n)]: n in [1..30]]; // _Klaus Brockhaus_, Jun 25 2009
%o (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
%o (PARI) for(n=1, 50, print1(sum(k=fibonacci(n-1), fibonacci(n), k), ", ")) \\ _G. C. Greubel_, Oct 24 2018
%Y Cf. A000045 (Fibonacci numbers), A000032 (Lucas numbers).
%K nonn,easy
%O 1,3
%A _Juri-Stepan Gerasimov_, Jun 18 2009
%E 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
%E Definition clarified by _Harvey P. Dale_, Feb 13 2023