%I #26 Sep 08 2022 08:46:09
%S 1,-1,0,1,-1,1,-1,0,2,-3,2,0,-2,4,-5,3,2,-7,9,-7,1,8,-16,17,-8,-8,24,
%T -32,25,-1,-32,57,-57,25,31,-88,114,-83,-6,120,-202,196,-77,-125,322,
%U -399,273,49,-447,720,-672,225,496,-1168,1392,-896,-271,1663,-2560
%N Expansion of 1 / (1 + x + x^2 - x^5) in powers of x.
%H Vincenzo Librandi, <a href="/A247920/b247920.txt">Table of n, a(n) for n = 0..1000</a>
%H Eunmi Choi, Yuna Oh, <a href="https://doi.org/10.11568/kjm.2019.27.3.723">Diagonal sums in negative trinomial table</a>, Korean J. Math (2019) Vol. 27, No. 3, 723-734.
%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (-1,-1,0,0,1).
%F G.f.: 1 / ((1 + x^2) * (1 + x - x^3)).
%F a(n) = A017818(-5-n) for all n in Z.
%F 0 = a(n) - a(n+3) - a(n+4) - a(n+5) for all n in Z.
%F 0 = a(n) - a(n+2) - a(n+3) + (-1)^floor(n/2) * mod(n,2) for all n in Z.
%e G.f. = 1 - x + x^3 - x^4 + x^5 - x^6 + 2*x^8 - 3*x^9 + 2*x^10 - 2*x^12 + ...
%p seq(coeff(series(1/(1+x+x^2-x^5), x, n+1), x, n), n = 0..60); # _G. C. Greubel_, Dec 29 2019
%t CoefficientList[Series[1/(1+x+x^2-x^5), {x, 0, 60}], x] (* _Vincenzo Librandi_, Sep 27 2014 *)
%o (PARI) {a(n) = if( n<0, n=-5-n; polcoeff( 1 / (1 - x^3 - x^4 - x^5) + x * O(x^n), n), polcoeff( 1 / (1 + x + x^2 - x^5) + x * O(x^n), n))};
%o (Magma) m:=50; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!(1 / ((1+x^2)*(1+x-x^3)))); // _G. C. Greubel_, Aug 04 2018
%o (Sage)
%o def A247920_list(prec):
%o P.<x> = PowerSeriesRing(ZZ, prec)
%o return P( 1/(1+x+x^2-x^5) ).list()
%o A247920_list(60) # _G. C. Greubel_, Dec 29 2019
%o (GAP) a:=[1,-1,0,1,-1];; for n in [6..60] do a[n]:=-(a[n-1]+a[n-2]-a[n-5]); od; a; # _G. C. Greubel_, Dec 29 2019
%Y Cf. A017818.
%K sign,easy
%O 0,9
%A _Michael Somos_, Sep 26 2014
|