A247917 Expansion of 1 / (1 + x - x^3) in powers of x.
1, -1, 1, 0, -1, 2, -2, 1, 1, -3, 4, -3, 0, 4, -7, 7, -3, -4, 11, -14, 10, 1, -15, 25, -24, 9, 16, -40, 49, -33, -7, 56, -89, 82, -26, -63, 145, -171, 108, 37, -208, 316, -279, 71, 245, -524, 595, -350, -174, 769, -1119, 945, -176, -943, 1888, -2064, 1121
Offset: 0
Examples
G.f. = 1 - x + x^2 - x^4 + 2*x^5 - 2*x^6 + x^7 + x^8 - 3*x^9 + 4*x^10 + ...
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (-1,0,1).
Programs
-
Magma
m:=60; R
:=PowerSeriesRing(Integers(), m); Coefficients(R!(1/(1 + x - x^3))); // G. C. Greubel, Aug 04 2018 -
Mathematica
CoefficientList[Series[1/(1 + x - x^3), {x, 0, 100}], x] (* Vincenzo Librandi, Sep 27 2014 *) LinearRecurrence[{-1,0,1},{1,-1,1},60] (* Harvey P. Dale, Apr 10 2025 *)
-
PARI
{a(n) = if( n<0, n = -3-n; polcoeff( 1 / (1 - x^2 - x^3) + x * O(x^n), n), polcoeff( 1 / (1 + x - x^3) + x * O(x^n), n))};