OFFSET
0,2
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,2,-1,-1).
FORMULA
G.f. ( 1+2*x-x^2 ) / ( (x-1)*(1+x)*(x^2+x-1) ). - R. J. Mathar, Aug 12 2012
a(n) = 3*Fibonacci(n+1)-2 if n even, a(n) = 3*Fibonacci(n+1) if n odd. - R. J. Mathar, Aug 12 2012
From Colin Barker, Jul 12 2017: (Start)
a(n) = (3*2^(-n-1)*((1 + sqrt(5))^(n+1) - (1 - sqrt(5))^(n+1))) / sqrt(5) - 2 for n even.
a(n) = (3*2^(-n-1)*((1 + sqrt(5))^(n+1) - (1 - sqrt(5))^(n+1))) / sqrt(5) for n odd.
a(n) = a(n-1) + 2*a(n-2) - a(n-3) - a(n-4) for n>3.
(End)
PROG
(PARI) Vec((1+2*x-x^2) / ((x-1)*(1+x)*(x^2+x-1)) + O(x^50)) \\ Colin Barker, Jul 12 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Gary W. Adamson, Jun 28 2007
STATUS
approved