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.
%I A051792 #23 Dec 07 2022 22:27:22 %S A051792 1,1,0,1,1,0,-1,1,2,-1,-3,2,5,-3,-8,5,13,-8,-21,13,34,-21,-55,34,89, %T A051792 -55,-144,89,233,-144,-377,233,610,-377,-987,610,1597,-987,-2584,1597, %U A051792 4181,-2584,-6765,4181,10946,-6765,-17711,10946,28657,-17711,-46368 %N A051792 a(n) = (-1)^(n-1)*(a(n-1) - a(n-2)), a(1)=1, a(2)=1. %H A051792 G. C. Greubel, <a href="/A051792/b051792.txt">Table of n, a(n) for n = 1..1000</a> %H A051792 <a href="/index/Tu#2wis">Index entries for two-way infinite sequences</a> %H A051792 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,-1,0,1). %F A051792 a(3-n) = A053602(n). %F A051792 From _Michael Somos_: (Start) %F A051792 G.f.: x*(1 + x + x^2 + 2*x^3)/(1 + x^2 - x^4). %F A051792 a(n) = -a(n-2) + a(n-4). (End) %F A051792 a(n) = b(n-1) + b(n-2) + b(n-3) + 2*b(n-4), where b(n) = i^n * A079977(n). - _G. C. Greubel_, Dec 06 2022 %t A051792 LinearRecurrence[{0,-1,0,1},{1,1,0,1},60] (* _Harvey P. Dale_, May 08 2017 *) %o A051792 (PARI) a(n)=fibonacci((3-n)\2+(3-n)%2*2) %o A051792 (Sage) %o A051792 def A051792(): %o A051792 x, y, b = 1, 1, true %o A051792 while True: %o A051792 yield x %o A051792 x, y = y, x - y %o A051792 y = -y if b else y %o A051792 b = not b %o A051792 a = A051792() %o A051792 print([next(a) for _ in range(51)]) # _Peter Luschny_, Mar 19 2020 %o A051792 (Magma) [Fibonacci(1 -Floor((n-4)/2) -2*((n-4) mod 2)): n in [1..60]]; // _G. C. Greubel_, Dec 06 2022 %Y A051792 Cf. A000045, A053602. %K A051792 easy,sign %O A051792 1,9 %A A051792 Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Dec 10 1999