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.

A077954 Expansion of 1/(1-x+2*x^2-x^3) in powers of x.

This page as a plain text file.
%I A077954 #23 Sep 08 2022 08:45:08
%S A077954 1,1,-1,-2,1,4,0,-7,-3,11,10,-15,-24,16,49,-7,-89,-26,145,108,-208,
%T A077954 -279,245,595,-174,-1119,-176,1888,1121,-2831,-3185,3598,7137,-3244,
%U A077954 -13920,-295,24301,10971,-37926,-35567,51256,84464,-53615,-171287,20407,309366,97265,-501060,-386224,713161
%N A077954 Expansion of 1/(1-x+2*x^2-x^3) in powers of x.
%H A077954 G. C. Greubel, <a href="/A077954/b077954.txt">Table of n, a(n) for n = 0..1000</a>
%H A077954 Paul Barry, <a href="https://arxiv.org/abs/2104.01644">Centered polygon numbers, heptagons and nonagons, and the Robbins numbers</a>, arXiv:2104.01644 [math.CO], 2021.
%H A077954 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1,-2,1).
%F A077954 a(0)=1, a(1)=1, a(2)=-1, a(n) = a(n-1) -2*a(n-2) +a(n-3) for n>=3. - _Philippe Deléham_, Sep 15 2006
%F A077954 a(n) = A000931(-2*n). - _Michael Somos_, Sep 18 2012
%F A077954 a(n) = A005314(-n-2). - _Michael Somos_, Dec 13 2013
%F A077954 a(n) = a(n-1) - 2*a(n-2) + a(n-3) for all n in Z. - _Michael Somos_, Dec 13 2013
%e A077954 G.f. = 1 + x - x^2 - 2*x^3 + x^4 + 4*x^5 - 7*x^7 - 3*x^8 + 11*x^9 + ...
%p A077954 seq(coeff(series(1/(1-x+2*x^2-x^3), x, n+1), x, n), n = 0..50); # _G. C. Greubel_, Aug 07 2019
%t A077954 a[ n_] := If[ n < 0, SeriesCoefficient[ x^3 / (1 - 2 x + x^2 - x^3), {x, 0, -n}], SeriesCoefficient[ 1 / (1 - x + 2 x^2 - x^3), {x, 0, n}]]
%t A077954 LinearRecurrence[{1,-2,1}, {1,1,-1}, 50] (* _G. C. Greubel_, Aug 07 2019 *)
%o A077954 (PARI) {a(n) = if( n<0,  polcoeff( x^3 / (1 - 2*x + x^2 - x^3) + x * O(x^-n), -n), polcoeff( 1 / (1 - x + 2*x^2 - x^3) + x * O(x^n), n))} /* _Michael Somos_, Sep 18 2012 */
%o A077954 (Magma) R<x>:=PowerSeriesRing(Integers(), 50); Coefficients(R!( 1/(1-x+2*x^2-x^3) )); // _G. C. Greubel_, Aug 07 2019
%o A077954 (Sage) (1/(1-x+2*x^2-x^3)).series(x, 50).coefficients(x, sparse=False) # _G. C. Greubel_, Aug 07 2019
%o A077954 (GAP) a:=[1,1,-1];; for n in [4..50] do a[n]:=a[n-1]-2*a[n-2]+a[n-3]; od; a; # _G. C. Greubel_, Aug 07 2019
%Y A077954 Cf. A000931, A005314.
%K A077954 sign,easy
%O A077954 0,4
%A A077954 _N. J. A. Sloane_, Nov 17 2002