OFFSET
1,1
COMMENTS
A sum of prior terms in the sequence, like the Fibonacci and Padovan sequences.
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,0,0,1,1).
FORMULA
a(n) = a(n-4) + a(n-5) with a(1) = 4, a(2) = 5, a(3) = 6, a(4) = 7 and a(5) = 8.
G.f.: x*(4 + 5*x + 6*x^2 + 7*x^3 + 4*x^4)/(1 - x^4 - x^5). - Andrew Howroyd, Oct 31 2018
EXAMPLE
a(6) = a(6-4) + a(6-5) = a(2) + a(1) = 5 + 4 = 9.
MATHEMATICA
Rest@ CoefficientList[Series[x (4 + 5 x + 6 x^2 + 7 x^3 + 4 x^4)/(1 - x^4 - x^5), {x, 0, 54}], x] (* Michael De Vlieger, Oct 31 2018 *)
PROG
(PARI) a(n) = if(n<=5, n+3, a(n-4) + a(n-5)); \\ Michel Marcus, Oct 31 2018
(PARI) Vec((4 + 5*x + 6*x^2 + 7*x^3 + 4*x^4)/(1 - x^4 - x^5) + O(x^50)) \\ Andrew Howroyd, Oct 31 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Mathew Munro, Oct 30 2018
EXTENSIONS
a(19), a(20) corrected by Georg Fischer, May 24 2019
STATUS
approved