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”).

A117791
Expansion of 1/(1 - x - x^2 + x^4 - x^6).
33
1, 1, 2, 3, 4, 6, 9, 13, 20, 30, 45, 68, 102, 153, 230, 345, 518, 778, 1168, 1754, 2634, 3955, 5939, 8918, 13391, 20108, 30194, 45339, 68081, 102230, 153508, 230507, 346128, 519744, 780445, 1171912, 1759737, 2642412, 3967832, 5958076, 8946616, 13434192
OFFSET
0,3
FORMULA
a(n) = a(n-1) + a(n-2) - a(n-4) + a(n-6). - Ilya Gutkovskiy, Nov 16 2016
MAPLE
seq(coeff(series(1/(1 -x -x^2 +x^4 -x^6), x, n+1), x, n), n = 0..50); # G. C. Greubel, Dec 05 2019
MATHEMATICA
CoefficientList[Series[1/(1 -x -x^2 +x^4 -x^6), {x, 0, 50}], x]
PROG
(PARI) Vec(1/(1 -x -x^2 +x^4 -x^6)+O(x^50)) \\ Charles R Greathouse IV, Sep 23 2012
(Magma) R<x>:=PowerSeriesRing(Integers(), 50); Coefficients(R!(1/(1-x-x^2+x^4-x^6))); // G. C. Greubel, Nov 03 2018
(Sage)
def A117791_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P( 1/(1 -x -x^2 +x^4 -x^6) ).list()
A117791_list(50) # G. C. Greubel, Dec 05 2019
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula, Apr 15 2006
EXTENSIONS
Edited by N. J. A. Sloane, Nov 08 2006
STATUS
approved