login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Sum of Fibonacci numbers between F(-n)....F(n), inclusive.
1

%I #21 Aug 07 2022 14:56:01

%S 0,2,2,6,6,16,16,42,42,110,110,288,288,754,754,1974,1974,5168,5168,

%T 13530,13530,35422,35422,92736,92736,242786,242786,635622,635622,

%U 1664080,1664080,4356618,4356618,11405774,11405774,29860704,29860704,78176338,78176338

%N Sum of Fibonacci numbers between F(-n)....F(n), inclusive.

%C a(2n)/a(2n+1) converges to ((((sqrt 5)-1)/2)^2).

%H Matthew House, <a href="/A140833/b140833.txt">Table of n, a(n) for n = 0..4760</a>

%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,3,0,-1).

%F a(2n-1) = a(2n).

%F a(n) = 3*a(n-2) - a(n-4).

%F G.f.: 2x(1+x)/((1-x-x^2)(1+x-x^2)). a(n)=2*A094966(n) = A000045(n+2)-A039834(n-1). - _R. J. Mathar_, Oct 30 2008

%F a(n) = -a(-1-n) for all n in Z. - _Michael Somos_, Nov 01 2016

%F a(n) = 2*A000045(ceiling(n/2)*2). - _Alois P. Heinz_, Nov 02 2016

%e a(3) = 2+(-1)+1+0+1+1+2=6.

%e G.f. = 2*x + 2*x^2 + 6*x^3 + 6*x^4 + 16*x^5 + 16*x^6 + 42*x^7 + ...

%p a:= n-> 2*(<<0|1>, <1|1>>^(ceil(n/2)*2))[1,2]:

%p seq(a(n), n=0..40); # _Alois P. Heinz_, Nov 02 2016

%t a[ n_] := 2 Fibonacci[ n + Mod[n, 2]]; (* _Michael Somos_, Nov 01 2016 *)

%t LinearRecurrence[{0,3,0,-1},{0,2,2,6},50] (* _Harvey P. Dale_, Aug 07 2022 *)

%o (PARI) {a(n) = 2 * fibonacci(n + n%2)}; /* _Michael Somos_, Nov 01 2016 */

%Y Cf. A000045, A025169, A001906.

%K nonn,easy

%O 0,2

%A Carey W. Strutz (cwstrutz(AT)excite.com), Jul 18 2008

%E a(21)-a(22) corrected by _Matthew House_, Nov 01 2016