cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A156089 Alternating sum of the squares of the first n odd-indexed Fibonacci numbers.

This page as a plain text file.
%I A156089 #17 Jun 13 2025 07:44:14
%S A156089 0,-1,3,-22,147,-1009,6912,-47377,324723,-2225686,15255075,-104559841,
%T A156089 716663808,-4912086817,33667943907,-230763520534,1581676699827,
%U A156089 -10840973378257,74305136947968,-509294985257521,3490759759854675
%N A156089 Alternating sum of the squares of the first n odd-indexed Fibonacci numbers.
%C A156089 Natural bilateral extension (brackets mark index 0): ..., 6912, -1009, 147, -22, 3, -1, [0], -1, 3, -22, 147, -1009, 6912, ... This is a(n)-reversed followed by a(n), without repeating the 0. That is, a(-n) = a(n).
%H A156089 G. C. Greubel, <a href="/A156089/b156089.txt">Table of n, a(n) for n = 0..1000</a>
%H A156089 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (-7,0,7,1).
%F A156089 Let F(n) be the n-th Fibonacci number, A000045(n), and L(n) be the n-th Lucas number, A000032(n).
%F A156089 a(n) = Sum_{k=1..n} (-1)^k F(2*k-1)^2.
%F A156089 Closed form: a(n) = (-1)^n * (L(4*n) + 3)/15 - 1/3.
%F A156089 Factored closed form: a(n) = (1/3)*F(2*n)^2 if n is even.
%F A156089 Not-so-factored closed form: a(n) = -(F(2*n)^2 + 2)/3 if n is odd.
%F A156089 Recurrence: a(n) + 7*a(n-1) - 7*a(n-3) - a(n-4) = 0.
%F A156089 G.f.: -x*(1 + 4*x + x^2)/(1 + 7*x - 7*x^3 - x^4) = -x*(1 + 4*x + x^2)/((1 - x)*(1 + x)*(1 + 7*x + x^2)).
%F A156089 E.g.f.: (2/15)*( exp(-7*x/2)*cosh(3*sqrt(5)*x/2) - cosh(x) - 4*sinh(x) ). - _G. C. Greubel_, Jun 12 2025
%t A156089 a[n_]:= If[n >= 0, Sum[(-1)^k Fibonacci[2k-1]^2, {k,n} ], -Sum[-(-1)^k Fibonacci[-2k+1]^2, {k,-n}]];
%t A156089 Join[{0},Accumulate[Times@@@Partition[Riffle[Fibonacci[Range[1,43,2]]^2, {-1,1}],2]]] (* _Harvey P. Dale_, Aug 18 2011 *)
%t A156089 LinearRecurrence[{-7,0,7,1}, {0,-1,3,-22}, 41] (* _G. C. Greubel_, Jun 12 2025 *)
%o A156089 (Magma)
%o A156089 A156089:= func< n | ((-1)^n*(Lucas(4*n)+3) - 5)/15 >; // _G. C. Greubel_, Jun 12 2025
%o A156089 (SageMath)
%o A156089 def A156089(n): return ((-1)^n*(lucas_number2(4*n,1,-1)+3)-5)//15 # _G. C. Greubel_, Jun 12 2025
%Y A156089 Cf. A000032, A000045, A103434, A103433, A156088.
%K A156089 sign,easy
%O A156089 0,3
%A A156089 _Stuart Clary_, Feb 04 2009