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.

A182228 a(n) = 3*a(n-2) - a(n-1) for n > 1, a(0) = 0, a(1) = 1.

This page as a plain text file.
%I A182228 #53 Sep 08 2022 08:45:55
%S A182228 0,1,-1,4,-7,19,-40,97,-217,508,-1159,2683,-6160,14209,-32689,75316,
%T A182228 -173383,399331,-919480,2117473,-4875913,11228332,-25856071,59541067,
%U A182228 -137109280,315732481,-727060321,1674257764,-3855438727,8878212019,-20444528200,47079164257,-108412748857
%N A182228 a(n) = 3*a(n-2) - a(n-1) for n > 1, a(0) = 0, a(1) = 1.
%C A182228 This is A006130 with minus signs on every other term. - _T. D. Noe_, Apr 23 2012
%H A182228 G. C. Greubel, <a href="/A182228/b182228.txt">Table of n, a(n) for n = 0..200</a>
%H A182228 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (-1,3).
%F A182228 From _R. J. Mathar_, Apr 22 2013: (Start)
%F A182228 a(n) = -A140167(n).
%F A182228 G.f.: x/(1 + x - 3*x^2). (End)
%F A182228 G.f.: 1 - Q(0), where Q(k) = 1 + 3*x^2 - (k+2)*x + x*(k+1 - 3*x)/Q(k+1); (continued fraction). - _Sergei N. Gladkovskii_, Oct 06 2013
%F A182228 E.g.f.: (-1/sqrt(13))*(exp(-(1+sqrt(13))*x/2) - exp(-(1-sqrt(13))*x/2)). - _G. C. Greubel_, Aug 30 2015
%F A182228 a(n) = (-(-1)^n/sqrt(13))*(((1 + sqrt(13))/2)^n - ((1 - sqrt(13))/2)^n). - _Taras Goy_, Jul 17 2018
%t A182228 RecurrenceTable[{a[n]== - a[n-1] + 3*a[n-2], a[0]== 0, a[1]== 1}, a, {n,0,200}] (* _G. C. Greubel_, Aug 30 2015 *)
%t A182228 LinearRecurrence[{-1,3},{0,1},40] (* _Harvey P. Dale_, Oct 23 2016 *)
%o A182228 (Python)
%o A182228 prpr = 0
%o A182228 prev = 1
%o A182228 for i in range(2,55):
%o A182228     current = prpr*3-prev
%o A182228     print (current, end=',')
%o A182228     prpr = prev
%o A182228     prev = current
%o A182228 (Magma) [n le 2 select n-1 else -Self(n-1) + 3*Self(n-2): n in [1..40]]; // _Vincenzo Librandi_, Aug 31 2015
%Y A182228 Cf. A140167.
%K A182228 sign,easy
%O A182228 0,4
%A A182228 _Alex Ratushnyak_, Apr 19 2012