OFFSET
0,3
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,0,0,1,0,0,1).
FORMULA
a(n) = a(n-7) + a(n-4) + a(n-1) for n>1 and a(n)=1 for n<=1.
G.f.: (1+2*x^2+2*x^3+x^4+x^5+x^6) / (1-x-x^4-x^7). - Wesley Ivan Hurt, Oct 08 2015
MATHEMATICA
LinearRecurrence[{1, 0, 0, 1, 0, 0, 1}, {1, 1, 3, 5, 7, 9, 13}, 50] (* or *) CoefficientList[Series[(1 + 2*x^2 + 2*x^3 + x^4 + x^5 + x^6)/(1 - x - x^4 - x^7), {x, 0, 50}], x] (* Wesley Ivan Hurt, Oct 08 2015 *)
PROG
(R) a<- (function(n) {if (n < 2) return(1); a(n-7) + a(n-4) + a(n-1)})
(Magma) I:=[1, 3, 5, 7, 9, 13, 19]; [n le 7 select I[n] else Self(n-7)+Self(n-4)+Self(n-1): n in [1..40]]; // Vincenzo Librandi, Oct 09 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Tobias Kind, Sep 25 2015
STATUS
approved