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 A077990 #22 Jan 11 2025 18:12:46 %S A077990 1,-2,3,-3,1,4,-12,21,-26,19,9,-63,136,-200,201,-66,-269,805,-1407, %T A077990 1740,-1268,-611,4230,-9117,13393,-13439,4368,18096,-53999,94270, %U A077990 -116445,84621,41473,-284012,611172,-896859,898534,-289037,-1217319,3622209,-6316136,7792744,-5647143,-2814594 %N A077990 Expansion of 1/(1 + 2*x + x^2 - x^3). %H A077990 G. C. Greubel, <a href="/A077990/b077990.txt">Table of n, a(n) for n = 0..1000</a> %H A077990 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (-2,-1,1). %F A077990 From _Paul Barry_, May 10 2005: (Start) %F A077990 G.f.: 1/((1+x)^2-x^3). %F A077990 a(n) = Sum_{k=0..n+4} (-1)^(n-k-1)*C(n+3, k)*Sum_{j=0..floor(k/3)} C(k-2j, j). (End) %F A077990 a(n) = (-1)^n * A077941(n). - _G. C. Greubel_, Jun 26 2019 %p A077990 A077990 := proc(n) %p A077990 option remember ; %p A077990 if n <=2 then %p A077990 (-1)^n*(n+1) ; %p A077990 else %p A077990 -2*procname(n-1)-procname(n-2)+procname(n-3) ; %p A077990 end if; %p A077990 end proc: %p A077990 seq(A077990(n),n=0..20) ; # _R. J. Mathar_, Feb 25 2024 %t A077990 CoefficientList[Series[1/(1+2x+x^2-x^3),{x,0,50}],x] (* or *) LinearRecurrence[ {-2,-1,1},{1,-2,3},50] (* _Harvey P. Dale_, Aug 10 2016 *) %o A077990 (PARI) Vec(1/(1+2*x+x^2-x^3)+O(x^50)) \\ _Charles R Greathouse IV_, Sep 26 2012 %o A077990 (Magma) R<x>:=PowerSeriesRing(Integers(), 50); Coefficients(R!( 1/(1+2*x+x^2-x^3) )); // _G. C. Greubel_, Jun 26 2019 %o A077990 (Sage) (1/(1+2*x+x^2-x^3)).series(x, 50).coefficients(x, sparse=False) # _G. C. Greubel_, Jun 26 2019 %o A077990 (GAP) a:=[1,-2,3];; for n in [4..50] do a[n]:=-2*a[n-1]-a[n-2]+a[n-3]; od; a; # _G. C. Greubel_, Jun 26 2019 %Y A077990 Cf. A077941. %K A077990 sign,easy %O A077990 0,2 %A A077990 _N. J. A. Sloane_, Nov 17 2002