OFFSET
1,1
COMMENTS
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,1,-1).
FORMULA
a(n) = a(n-1) + a(n-2) - a(n-3), n >= 4.
G.f.: x*(7 + 6*x + 17*x^2)/((1 + x)*(1 - x)^2).
a(n) = a(n-2) + 30.
a(n) = 10*(3*n - 4) - a(n-1).
From Colin Barker, Jan 24 2016: (Start)
a(n) = (30*n-9*(-1)^n-25)/2 for n>0.
a(n) = 15*n-17 for n>0 and even.
a(n) = 15*n-8 for n odd.
(End)
E.g.f.: 17 + ((30*x - 25)*exp(x) - 9*exp(-x))/2. - David Lovler, Sep 10 2022
MATHEMATICA
LinearRecurrence[{1, 1, -1}, {7, 13, 37}, 52]
PROG
(Magma) [n: n in [0..763] | n mod 30 in {7, 13}];
(PARI) Vec(x*(7 + 6*x + 17*x^2)/((1 + x)*(1 - x)^2) + O(x^53))
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Arkadiusz Wesolowski, Jan 23 2016
EXTENSIONS
Comment corrected by Philippe Deléham, Nov 28 2016
STATUS
approved