OFFSET
1,6
COMMENTS
Lim_{n -> infinity} a(n+1)/a(n) = s = 1.4291083198381..., where s is the root of the characteristic equation s^5 = s^3 + s^2 + 1.
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (0, 1, 1, 0, 1).
FORMULA
G.f.: (x^4 + x^3 - x - 1)/(x^5 + x^3 + x^2 - 1).
EXAMPLE
a(7) = a(5) + a(4) + a(2) = 3.
MAPLE
seq(coeff(series((x^4+x^3-x-1)/(x^5+x^3+x^2-1), x, n+1), x, n), n = 0 .. 50); # Muniru A Asiru, Feb 17 2019
MATHEMATICA
LinearRecurrence[{0, 1, 1, 0, 1}, {1, 1, 1, 1, 1}, 50] (* G. C. Greubel, Feb 17 2019 *)
PROG
(PARI) a(n) = my(v=vector(n)); for(k=1, n, v[k]=if(k<=5, 1, v[k-2]+v[k-3]+v[k-5])); v[n] \\ Jianing Song, Feb 04 2019
(PARI) my(x='x+O('x^50)); Vec((x^4+x^3-x-1)/(x^5+x^3+x^2-1)) \\ G. C. Greubel, Feb 17 2019
(Magma) m:=50; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!( (x^4+x^3-x-1)/(x^5+x^3+x^2-1) )); // G. C. Greubel, Feb 17 2019
(Sage) ((x^4+x^3-x-1)/(x^5+x^3+x^2-1)).series(x, 50).coefficients(x, sparse=False) # G. C. Greubel, Feb 17 2019
(GAP) a:=[1, 1, 1, 1, 1];; for n in [6..30] do a[n]:=a[n-2]+a[n-3]+a[n-5]; od; a; # G. C. Greubel, Feb 17 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Carmine Suriano, Apr 19 2010
STATUS
approved