login
A262602
a(n) = a(n-7) + a(n-4) + a(n-1) for n>1 and a(n)=1 for n<=1.
0
1, 1, 3, 5, 7, 9, 13, 19, 27, 39, 57, 83, 119, 171, 247, 357, 515, 743, 1073, 1549, 2235, 3225, 4655, 6719, 9697, 13995, 20199, 29153, 42075, 60725, 87643, 126493, 182563, 263487, 380283, 548851, 792139, 1143269, 1650045, 2381459, 3437085, 4960637, 7159533
OFFSET
0,3
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
Sequence in context: A121259 A211139 A089228 * A133847 A134180 A107220
KEYWORD
nonn,easy
AUTHOR
Tobias Kind, Sep 25 2015
STATUS
approved