login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A077990 Expansion of 1/(1+2*x+x^2-x^3). 4

%I #16 Feb 25 2024 06:39:11

%S 1,-2,3,-3,1,4,-12,21,-26,19,9,-63,136,-200,201,-66,-269,805,-1407,

%T 1740,-1268,-611,4230,-9117,13393,-13439,4368,18096,-53999,94270,

%U -116445,84621,41473,-284012,611172,-896859,898534,-289037,-1217319,3622209,-6316136,7792744,-5647143,-2814594

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

%H G. C. Greubel, <a href="/A077990/b077990.txt">Table of n, a(n) for n = 0..1000</a>

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (-2, -1, 1).

%F From _Paul Barry_, May 10 2005: (Start)

%F G.f.: 1/((1+x)^2-x^3).

%F 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 a(n) = (-1)^n * A077941(n). - _G. C. Greubel_, Jun 26 2019

%p A077990 := proc(n)

%p option remember ;

%p if n <=2 then

%p (-1)^n*(n+1) ;

%p else

%p -2*procname(n-1)-procname(n-2)+procname(n-3) ;

%p end if;

%p end proc:

%p seq(A077990(n),n=0..20) ; # _R. J. Mathar_, Feb 25 2024

%t 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 (PARI) Vec(1/(1+2*x+x^2-x^3)+O(x^50)) \\ _Charles R Greathouse IV_, Sep 26 2012

%o (Magma) R<x>:=PowerSeriesRing(Integers(), 50); Coefficients(R!( 1/(1+2*x+x^2-x^3)) )); // _G. C. Greubel_, Jun 26 2019

%o (Sage) (1/(1+2*x+x^2-x^3)).series(x, 50).coefficients(x, sparse=False) # _G. C. Greubel_, Jun 26 2019

%o (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 Cf. A077941.

%K sign,easy

%O 0,2

%A _N. J. A. Sloane_, Nov 17 2002

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 05:20 EDT 2024. Contains 371906 sequences. (Running on oeis4.)