OFFSET
1,2
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (2,3,-4,-4).
FORMULA
a(n) = ((15*n+4)*2^(n-1)-2*(3*n+1)*(-1)^n)/27.
From Colin Barker, Jan 08 2020: (Start)
G.f.: x*(1 + x^2) / ((1 + x)^2*(1 - 2*x)^2).
a(n) = 2*a(n-1) + 3*a(n-2) - 4*a(n-3) - 4*a(n-4) for n>4.
(End)
PROG
(PARI) a(n)={((15*n+4)*2^(n-1) - 2*(3*n+1)*(-1)^n)/27} \\ Andrew Howroyd, Jan 08 2020
(PARI) Vec(x*(1 + x^2) / ((1 + x)^2*(1 - 2*x)^2) + O(x^35)) \\ Colin Barker, Jan 08 2020
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Vladeta Jovovic, Feb 06 2005
EXTENSIONS
Terms a(26) and beyond from Andrew Howroyd, Jan 08 2020
STATUS
approved