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.

A077986 Expansion of 1/(1 + 2*x - x^2 + x^3).

This page as a plain text file.
%I A077986 #31 Sep 08 2022 08:45:08
%S A077986 1,-2,5,-13,33,-84,214,-545,1388,-3535,9003,-22929,58396,-148724,
%T A077986 378773,-964666,2456829,-6257097,15935689,-40585304,103363394,
%U A077986 -263247781,670444260,-1707499695,4348691431,-11075326817,28206844760,-71837707768,182957587113,-465959726754
%N A077986 Expansion of 1/(1 + 2*x - x^2 + x^3).
%H A077986 G. C. Greubel, <a href="/A077986/b077986.txt">Table of n, a(n) for n = 0..1000</a>
%H A077986 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (-2,1,-1).
%F A077986 a(n) = (-1)^n * A077939(n). - _Joerg Arndt_, Sep 30 2012
%F A077986 a(n) = -2*a(n-1) + a(n-2) - a(n-3), with a(0)=1, a(1)=-2, a(2)=5. - _Harvey P. Dale_, Feb 14 2014
%p A077986 m:=30; S:=series(1/(1+2*x-x^2+x^3), x, m+1): seq(coeff(S, x, j), j=0..m); # _G. C. Greubel_, Feb 26 2020
%t A077986 CoefficientList[Series[1/(1+2x-x^2+x^3),{x,0,30}],x] (* or *) LinearRecurrence[ {-2,1,-1},{1,-2,5},30] (* _Harvey P. Dale_, Feb 14 2014 *)
%t A077986 b[n_]:= b[n]= If[n<3, n, 2*b[n-1] +b[n-2] +b[n-3]]; Table[(-1)^n*b[n+1], {n, 0, 30}] (* _Rigoberto Florez_, Jan 23 2020 *)
%o A077986 (PARI) Vec(1/(1+2*x-x^2+x^3)+O(x^30)) \\ _Charles R Greathouse IV_, Sep 26 2012
%o A077986 (Magma) R<x>:=PowerSeriesRing(Integers(), 30); Coefficients(R!( 1/(1+2*x-x^2+x^3) )); // _G. C. Greubel_, Jun 25 2019
%o A077986 (Sage)
%o A077986 def A077986_list(prec):
%o A077986     P.<x> = PowerSeriesRing(ZZ, prec)
%o A077986     return ( 1/(1+2*x-x^2+x^3) ).list()
%o A077986 A077986_list(30) # _G. C. Greubel_, Jun 25 2019
%o A077986 (GAP) a:=[1,-2,5];; for n in [4..30] do a[n]:=-2*a[n-1]+a[n-2]-a[n-3]; od; a; # _G. C. Greubel_, Jun 25 2019
%Y A077986 Cf. A077939.
%K A077986 sign,easy
%O A077986 0,2
%A A077986 _N. J. A. Sloane_, Nov 17 2002