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

%I #27 Sep 08 2022 08:45:08

%S 1,0,-2,-1,3,3,-4,-7,4,14,-1,-25,-9,40,33,-56,-82,63,171,-37,-316,-71,

%T 524,350,-769,-945,943,2064,-767,-3952,-354,6783,3539,-10381,-10676,

%U 13625,24596,-13330,-48897,2359,86823,33208,-138079,-117672,191694,288959,-212101,-598325,114836,1099385,271388

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

%C With 1 prepended, and up to sign this is the q-deformation of 12/5. See Leclere and Morier-Genoud. - _Michel Marcus_, Jul 01 2021

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

%H Ludivine Leclere and Sophie Morier-Genoud, <a href="https://arxiv.org/abs/2101.02953">q-deformations of the modular group and of the real quadratic irrational numbers</a>, arXiv:2101.02953 [math.NT], 2021. See Example 2.7 p. 6.

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

%F a(n) = a(n-1) - 2*a(n-2) + a(n-3). - _Michael Somos_, Sep 18 2012

%F a(n) = -A000931(-2*n - 1). - _Michael Somos_, Sep 18 2012

%F G.f.: (1+x)/x^3 - 1/( Q(0) - x )/x^3 where Q(k) = 1 - x^2/(x^2*k - 1 )/Q(k+1) ; (recursively defined continued fraction). - _Sergei N. Gladkovskii_, Feb 23 2013

%F a(n) = (-1)^(n-1)*(A077979(n) + A077979(n-1)) = A077954(n) - A077954(n-1). - _G. C. Greubel_, Jun 29 2019

%e G.f. = 1 - 2*x^2 - x^3 + 3*x^4 + 3*x^5 - 4*x^6 - 7*x^7 + 4*x^8 + ...

%t CoefficientList[Series[(1-x)/(1-x+2x^2-x^3),{x,0,50}],x] (* or *) LinearRecurrence[{1,-2,1},{1,0,-2},51] (* _Harvey P. Dale_, Feb 18 2013 *)

%o (PARI) {a(n) = if( n<0, polcoeff( (1 - 2*x) / (1 - 2*x + x^2 - x^3) + x * O(x^-n), -n), polcoeff( (1 - x) / (1 - x + 2*x^2 - x^3) + x * O(x^n), n))} /* _Michael Somos_, Sep 18 2012 */

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

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

%o (GAP) a:=[1,0,-2];; for n in [4..50] do a[n]:=a[n-1]-2*a[n-2]+a[n-3]; od; a; # _G. C. Greubel_, Jun 29 2019

%Y Cf. A000931, A077954, A077979.

%K sign,easy

%O 0,3

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