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.

A166012 a(n) = 2*(A000045(n)-(n mod 2)) + 1 + (n mod 2).

Original entry on oeis.org

1, 2, 3, 4, 7, 10, 17, 26, 43, 68, 111, 178, 289, 466, 755, 1220, 1975, 3194, 5169, 8362, 13531, 21892, 35423, 57314, 92737, 150050, 242787, 392836, 635623, 1028458, 1664081, 2692538, 4356619, 7049156, 11405775, 18454930, 29860705, 48315634, 78176339
Offset: 0

Views

Author

Antti Karttunen, Oct 05 2009

Keywords

Comments

This is an auxiliary sequence for computing A138606.

Programs

  • Mathematica
    Table[2*Fibonacci[n] + (1 + (-1)^n)/2, {n, 0, 100}] (* G. C. Greubel, Apr 21 2016 *)
    LinearRecurrence[{1,2,-1,-1},{1,2,3,4},40] (* Harvey P. Dale, May 01 2018 *)
  • PARI
    Vec((1+x-x^2-2*x^3)/((1-x)*(1+x)*(1-x-x^2)) + O(x^50)) \\ Colin Barker, Apr 22 2016

Formula

a(2n) = 2*A000045(2n) + 1, a(2n+1) = 2*A000045(2n+1).
Without reference to A000045: a(n)=2*Floor(a(n-1)/2)+a(n-2). - Clark Kimberling, Nov 07 2009
If n mod 2 = 0 then a(n) = a(n-1) + a(n-2), else a(n) = a(n-1) + a(n-2) - 1.
a(n) = 2*Fibonacci(n) + (1+(-1)^n)/2.
a(n) = 2*Fibonacci(n) + [(n+1)mod 2]. - Gary Detlefs, Dec 29 2010
G.f.: (1 + x - x^2 - 2*x^3)/((1 - x^2)*(1 - x - x^2)). - Ilya Gutkovskiy, Apr 22 2016
From Colin Barker, Apr 22 2016: (Start)
a(n) = a(n-1)+2*a(n-2)-a(n-3)-a(n-4) for n>3.
a(n) = (1/2+(-1)^n/2-(2*((1/2*(1-sqrt(5)))^n-(1/2*(1+sqrt(5)))^n))/sqrt(5)).
(End)