[go: up one dir, main page]

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

%I #26 Sep 08 2022 08:45:19

%S 1,-1,-1,-2,0,-1,2,-1,3,-3,4,-6,7,-10,13,-17,23,-30,40,-53,70,-93,123,

%T -163,216,-286,379,-502,665,-881,1167,-1546,2048,-2713,3594,-4761,

%U 6307,-8355,11068,-14662,19423,-25730,34085,-45153,59815,-79238,104968,-139053,184206,-244021,323259,-428227,567280

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

%C Diagonal sums of Riordan array (1-x-2x^2,x(1-x)), A109246.

%H Vincenzo Librandi, <a href="/A109248/b109248.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 (0,1,-1).

%F a(n) = a(n-2) - a(n-3), starting 1, -1, -1.

%F a(n) = (-1)^n * (A000931(n) - A000931(n-3) ), for n>2. - _Ralf Stephan_, Mar 10 2014

%t a[0] = 1; a[1] = -1; a[2] = -1; a[n_] := a[n - 2] - a[n - 3]; Table[a[n], {n, 0, 50}] (* _Wesley Ivan Hurt_, Mar 06 2014 *)

%t CoefficientList[Series[(1 - x - 2 x^2)/(1 - x^2 + x^3), {x, 0, 40}], x] (* _Vincenzo Librandi_. Mar 12 2014 *)

%t LinearRecurrence[{0,1,-1},{1,-1,-1},60] (* _Harvey P. Dale_, Jun 03 2014 *)

%o (Magma) I:=[1,-1,-1,-2,0,-1]; [n le 6 select I[n] else Self(n-2)-Self(n-3): n in [1..60]]; // _Vincenzo Librandi_, Mar 12 2014

%o (PARI) Vec((1-x-2*x^2)/(1-x^2+x^3) + O(x^50)) \\ _Michel Marcus_, Sep 17 2016

%K sign,easy

%O 0,4

%A _Paul Barry_, Jun 23 2005