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 A116697 #27 Jun 09 2025 10:25:32 %S A116697 1,1,-2,2,-2,5,-9,13,-20,34,-56,89,-143,233,-378,610,-986,1597,-2585, %T A116697 4181,-6764,10946,-17712,28657,-46367,75025,-121394,196418,-317810, %U A116697 514229,-832041,1346269,-2178308,3524578,-5702888 %N A116697 a(n) = -a(n-1) - a(n-3) + a(n-4). %H A116697 G. C. Greubel, <a href="/A116697/b116697.txt">Table of n, a(n) for n = 0..1000</a> %H A116697 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (-1,0,-1,1). %F A116697 G.f.: (1 + 2*x - x^2 + x^3)/((1 + x^2)*(1 + x - x^2)). %F A116697 a(2*n+1) = A000045(2*n+1) = A001519(n). %F A116697 a(2*n) = - A128535(n+1). - _Reinhard Zumkeller_, Feb 25 2011 %F A116697 a(n) = A056594(n) - (-1)^n*A000045(n). - _Bruno Berselli_, Feb 26 2011 %F A116697 E.g.f.: cos(x) + (2/sqrt(5))*exp(-x/2)*sinh(sqrt(5)*x/2). - _G. C. Greubel_, Jun 08 2025 %t A116697 LinearRecurrence[{-1,0,-1,1},{1,1,-2,2},40] (* _Harvey P. Dale_, Nov 04 2011 *) %o A116697 (Haskell) %o A116697 a116697 n = a116697_list !! n %o A116697 a116697_list = [1,1,-2,2] %o A116697 ++ (zipWith (-) a116697_list %o A116697 $ zipWith (+) (tail a116697_list) %o A116697 (drop 3 a116697_list)) %o A116697 a128535_list = 0 : (map negate $ map a116697 [0,2..]) %o A116697 a001519_list = 1 : map a116697 [1,3..] %o A116697 a186679_list = zipWith (-) (tail a116697_list) a116697_list %o A116697 a128533_list = map a186679 [0,2..] %o A116697 a081714_list = 0 : (map negate $ map a186679 [1,3..]) %o A116697 a075193_list = 1 : -3 : (zipWith (+) a186679_list $ drop 2 a186679_list) %o A116697 -- _Reinhard Zumkeller_, Feb 25 2011 %o A116697 (Magma) %o A116697 A116697:= func< n | (-1)^Floor((n+1)/2)*(1+(-1)^n)/2 -(-1)^n*Fibonacci(n) >; %o A116697 [A116697(n): n in [0..50]]; // _G. C. Greubel_, Jun 08 2025 %o A116697 (SageMath) %o A116697 def A116697(n): return (-1)^(n//2)*((n+1)%2) - (-1)^n*fibonacci(n) %o A116697 print([A116697(n) for n in range(51)]) # _G. C. Greubel_, Jun 08 2025 %Y A116697 Cf. A000045, A001519, A006498, A056594, A115008, A116698, A116699, A128535. %Y A116697 Cf. A186679 (first differences). %K A116697 easy,nice,sign %O A116697 0,3 %A A116697 _Creighton Dement_, Feb 23 2006