OFFSET
0,2
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,3).
FORMULA
G.f.: (1 + 7*x)/((1 + x)*(1 - 3*x)). - Andrew Howroyd, Feb 02 2020
From Klaus Purath, Mar 10 2021: (Start)
a(n) = (5*3^n - 3*(-1)^n)/2.
a(2*n) = (5*9^n - 3)/2.
a(2*n+1) = (15*9^n + 3)/2.
a(n) = 20*3^(n-2) + a(n-2), n > 1.
a(n) = A096019(n) - 2*(-1)^n. (End)
MATHEMATICA
LinearRecurrence[{2, 3}, {1, 9}, 30] (* Harvey P. Dale, Jul 31 2023 *)
PROG
(PARI) Vec((1 + 7*x)/((1 + x)*(1 - 3*x)) + O(x^40)) \\ Andrew Howroyd, Feb 02 2020
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Apr 21 2008
EXTENSIONS
Terms a(10) and beyond from Andrew Howroyd, Feb 02 2020
STATUS
approved