cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A135992 Positive Fibonacci numbers swapped in pairs.

Original entry on oeis.org

1, 1, 3, 2, 8, 5, 21, 13, 55, 34, 144, 89, 377, 233, 987, 610, 2584, 1597, 6765, 4181, 17711, 10946, 46368, 28657, 121393, 75025, 317811, 196418, 832040, 514229, 2178309, 1346269, 5702887, 3524578, 14930352, 9227465, 39088169, 24157817
Offset: 1

Views

Author

Paul Curtz, Mar 03 2008

Keywords

Comments

Analogous to A108362. It could be natural to define here too a(0) = 1 (swapping Fibonacci numbers from A212804). - Giuseppe Coppoletta, Mar 04 2015

Examples

			a(7) = Fibonacci(8) = 21, a(8) = Fibonacci(7) = 13.
		

Crossrefs

Programs

  • Maple
    a[1]:=1: a[2]:=1: for n from 2 to 20 do a[2*n-1]:=a[2*n-2]+2*a[2*n-3]: a[2*n]:=a[2*n-1]-a[2*n-3] end do: seq(a[n],n=1..40); # Emeric Deutsch, Mar 22 2008
  • Mathematica
    Flatten[{Last[#],First[#]}&/@Partition[Fibonacci[Range[40]],2]] (* Harvey P. Dale, Sep 16 2013 *)
    Table[(LucasL[n] - (-1)^n Fibonacci[n])/2, {n, 40}] (* Vladimir Reshetnikov, Sep 24 2016 *)
  • SageMath
    [fibonacci(n-(-1)^n) for n in range (1,39)] # Giuseppe Coppoletta, Mar 04 2015

Formula

From Emeric Deutsch, Mar 22 2008: (Start)
a(2n-1) = Fibonacci(2n), a(2n) = Fibonacci(2n-1).
a(2n-1) = a(2n-2) + 2*a(2n-3), a(2n) = a(2n-1) - a(2n-3), a(1)=a(2)=1. (End)
G.f.: (x*(1+x-x^3)) / ((x^2+x-1)*(x^2-x-1)). - R. J. Mathar, Mar 08 2011
a(n) = (Lucas(n) - (-1)^n * Fibonacci(n))/2. - Vladimir Reshetnikov, Sep 24 2016

Extensions

More terms from Emeric Deutsch, Mar 22 2008