OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,0,-1).
FORMULA
a(n+1) = a(n) + 2*A000045(n+2). - Reinhard Zumkeller, Nov 17 2013
From Colin Barker, Feb 01 2017: (Start)
a(n) = -3 + (2^(1-n)*((1-r)^n*(-2+r) + (1+r)^n*(2+r))) / r where r=sqrt(5).
a(n) = 2*a(n-1) - a(n-3) for n>2.
(End)
a(n) = 2*Fibonacci(n+3) - 3. - Greg Dresden, Oct 10 2020
MAPLE
A154691 := proc(n) coeftayl( (1+x+x^2)/(1-x-x^2)/(1-x), x=0, n) ; end proc:
MATHEMATICA
Fibonacci[Range[3, 5! ]]*2-3 (* Vladimir Joseph Stephan Orlovsky, Mar 19 2010 *)
CoefficientList[Series[(1 + x + x^2)/((1 - x - x^2)(1 - x)), {x, 0, 40}], x] (* Vincenzo Librandi, Dec 18 2012 *)
PROG
(Haskell)
a154691 n = a154691_list !! n
a154691_list = 1 : zipWith (+)
a154691_list (drop 2 $ map (* 2) a000045_list)
-- Reinhard Zumkeller, Nov 17 2013
(PARI) Vec((1+x+x^2) / ((1-x-x^2)*(1-x)) + O(x^60)) \\ Colin Barker, Feb 01 2017
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
R. J. Mathar, Jan 14 2009
STATUS
approved