OFFSET
0,3
COMMENTS
See A115339 for an essentially identical sequence.
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
Index entries for linear recurrences with constant coefficients, signature (0,1,0,1).
FORMULA
a(0) = 0, a(1) = 1, a(2) = 2, a(3) = 3, a(4) = 4, a(5) = 5, a(6) = 7, a(n) = a(n-2) + a(n-4) for n>6.
a(2*n) = Lucas(n+1) = Fibonacci(n) + Fibonacci(n+2) for n>1.
a(2*n+1) = Fibonacci(n+3) for n>2.
G.f.: -x*(x^2+x+1)*(x^3+x+1)/(-1+x^4+x^2). - Maksym Voznyy (voznyy(AT)mail.ru), Aug 12 2009
a(n) = FL((n + 2 + 3*(n mod 2))/2, n mod 2, 1/2)) for n >= 3. Here FL(n, a, b) = hypergeom([a - n/2, b - n/2], [1 - n], -4). - Peter Luschny, Sep 03 2019
MAPLE
FL := (n, a, b) -> hypergeom([a - n/2, b - n/2], [1 - n], -4):
a := n -> `if`(n < 3, n, FL((n + 2 + 3*irem(n, 2))/2, irem(n, 2), 1/2)):
seq(simplify(a(n)), n=0..52); # Peter Luschny, Sep 03 2019
MATHEMATICA
CoefficientList[Series[-x*(x^2 + x + 1)*(x^3 + x + 1)/(-1 + x^4 + x^2), {x, 0, 50}], x] (* G. C. Greubel, Dec 21 2017 *)
With[{nn=50}, Select[Union[Join[LucasL[Range[0, nn]], Fibonacci[Range[0, nn]]]], #<=200000&]] (* Harvey P. Dale, Jul 05 2019 *)
PROG
(Haskell)
import Data.List (transpose)
a116470 n = a116470_list !! n
a116470_list = 0 : 1 : 2 : concat
(transpose [drop 4 a000045_list, drop 3 a000032_list])
-- Reinhard Zumkeller, Aug 03 2013
(PARI) x='x+O('x^30); concat([0], Vec(-x*(x^2+x+1)*(x^3+x+1)/( -1+x^4 +x^2))) \\ G. C. Greubel, Dec 21 2017
(PARI) a(n)=if(n<6, n, if(n%2, fibonacci(n\2+3), fibonacci(n\2)+fibonacci(n\2+2))) \\ Charles R Greathouse IV, Oct 14 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Alexander Adamchuk, Aug 13 2006
STATUS
approved