OFFSET
0,3
COMMENTS
Here Fibonacci numbers are swapped in pairs, beginning with the pair (F(0),F(1)) changed in (F(1),F(0)). Similar to A135992, which starts switching F(1) and F(2). - Giuseppe Coppoletta, Mar 04 2015
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,3,0,-1).
FORMULA
G.f.: (1-x^2+x^3)/(1-3x^2+x^4).
a(n) = 3*a(n-2) - a(n-4) for n>3 with a(0)=1, a(1)=0, a(2)=2, a(3)=1.
a(n) = (sqrt(5)/2-1/2)^n * ((-1)^n/2-sqrt(5)/10)+(sqrt(5)/2+1/2)^n * (sqrt(5)*(-1)^n/10+1/2).
From Giuseppe Coppoletta, Mar 04 2015: (Start)
a(2n) = a(2n-1) + 2*a(2n-2), a(2n+1) = (a(2n) + a(2n-1))/2. (End)
a(n) = ((-1)^n * Fibonacci(n) + Lucas(n))/2. - Vladimir Reshetnikov, Sep 24 2016
EXAMPLE
a(6) = Fibonacci(7) = 13, a(7) = Fibonacci(6) = 8.
MAPLE
a:= n-> (<<0|1>, <1|1>>^(n+(-1)^n))[1, 2]:
seq(a(n), n=0..40); # Alois P. Heinz, Sep 27 2023
MATHEMATICA
Flatten[Reverse/@Partition[Fibonacci[Range[0, 40]], 2]] (* or *) LinearRecurrence[{0, 3, 0, -1}, {1, 0, 2, 1}, 40] (* Harvey P. Dale, Sep 09 2015 *)
Table[((-1)^n Fibonacci[n] + LucasL[n])/2, {n, 0, 40}] (* Vladimir Reshetnikov, Sep 24 2016 *)
PROG
(Sage) [fibonacci(n+(-1)^n) for n in range(39)] # Giuseppe Coppoletta, Mar 04 2015
(PARI) Vec((1-x^2+x^3)/(1-3*x^2+x^4) + O(x^50)) \\ Michel Marcus, Mar 04 2015
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, May 31 2005
STATUS
approved