OFFSET
0,5
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 462
Index entries for linear recurrences with constant coefficients, signature (1,0,1,1,-1).
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
KEYWORD
easy,nonn
AUTHOR
encyclopedia(AT)pommard.inria.fr, Jan 25 2000
EXTENSIONS
More terms from James A. Sellers, Jun 05 2000
STATUS
approved