login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A077887
Expansion of (1-x)^(-1)/(1+x^2-2*x^3).
0
1, 1, 0, 2, 3, -1, 2, 8, -3, -3, 20, -2, -25, 43, 22, -92, 65, 137, -248, -6, 523, -489, -534, 1536, -443, -2603, 3516, 1718, -8721, 5315, 12158, -22756, -1527, 47073, -43984, -50126, 138131, -37841, -238382, 314104, 162701, -790867, 465508, 1116270, -2047241, -185253, 4279782, -3909228
OFFSET
0,4
FORMULA
a(n) = a(n-1) - a(n-2) + 3 a(n-3) - 2 a(n-4), with a(0) = a(1) = 1, a(2) = 0 and a(3) = 2. - Jean-François Alcover, Apr 06 2016
a(n) = n+1 - a(n-1) - 2*a(n-2), with a(0) = a(1) = 1. - Michel Marcus, Apr 06 2016
MATHEMATICA
RecurrenceTable[{a[1] == a[2] == 1, a[n] == n - a[n-1] - 2 a[n-2]}, a, {n, 50}] (* Jean-François Alcover, Apr 06 2016 *)
LinearRecurrence[{1, -1, 3, -2}, {1, 1, 0, 2}, 50] (* Harvey P. Dale, Sep 14 2019 *)
PROG
(PARI) Vec(1/((1-x)*(1+x^2-2*x^3)) + O(x^60)) \\ Michel Marcus, Apr 06 2016
CROSSREFS
Sequence in context: A209557 A183759 A101477 * A059379 A065487 A341287
KEYWORD
sign,easy
AUTHOR
N. J. A. Sloane, Nov 17 2002
STATUS
approved