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

A052532
Expansion of (1-x)/(1-x-x^3-x^4+x^5).
2
1, 0, 0, 1, 2, 1, 2, 5, 7, 8, 14, 24, 34, 49, 79, 123, 182, 276, 429, 655, 990, 1513, 2321, 3537, 5385, 8229, 12574, 19175, 29252, 44670, 68190, 104043, 158790, 242398, 369961, 564604, 861749, 1315318, 2007485, 3063877, 4676340, 7137394, 10893438
OFFSET
0,5
FORMULA
G.f.: (1 - x)/(1 - x - x^3 - x^4 + x^5).
a(n) = a(n-1) + a(n-3) + a(n-4) - a(n-5), with a(0)=1, a(1)=0, a(2)=0, a(3)=1, a(4)=2.
a(n) = Sum_{alpha = RootOf(1-x-x^3-x^4+x^5)} (1/8519)*(138 + 2003*alpha - 346*alpha^2 - 444*alpha^3 + 11*alpha^4)*alpha^(-1-n).
MAPLE
spec := [S, {S=Sequence(Prod(Z, Z, Z, Union(Z, Sequence(Z))))}, unlabeled]: seq(combstruct[count](spec, size=n), n=0..20);
MATHEMATICA
CoefficientList[Series[(1-x)/(1-x-x^3-x^4+x^5), {x, 0, 50}], x] (* Vincenzo Librandi, Apr 28 2014 *)
LinearRecurrence[{1, 0, 1, 1, -1}, {1, 0, 0, 1, 2}, 50] (* Harvey P. Dale, May 12 2018 *)
PROG
(PARI) my(x='x+O('x^50)); Vec((1-x)/(1-x-x^3-x^4+x^5)) \\ G. C. Greubel, May 09 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 50); Coefficients(R!( (1-x)/(1-x-x^3-x^4+x^5) )); // G. C. Greubel, May 09 2019
(Sage) ((1-x)/(1-x-x^3-x^4+x^5)).series(x, 50).coefficients(x, sparse=False) # G. C. Greubel, May 09 2019
(GAP) a:=[1, 0, 0, 1, 2];; for n in [6..50] do a[n]:=a[n-1]+a[n-3]+a[n-4] -a[n-5]; od; a; # G. C. Greubel, May 09 2019
CROSSREFS
Sequence in context: A120898 A153910 A208021 * A006702 A129394 A214899
KEYWORD
easy,nonn
AUTHOR
encyclopedia(AT)pommard.inria.fr, Jan 25 2000
EXTENSIONS
More terms from James A. Sellers, Jun 05 2000
STATUS
approved