The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A166012 a(n) = 2*(A000045(n)-(n mod 2)) + 1 + (n mod 2). 2
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
This is an auxiliary sequence for computing A138606.
LINKS
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)
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 *)
PROG
(MIT Scheme:) (define (A166012 n) (+ 1 (modulo n 2) (* 2 (- (A000045 n) (modulo n 2)))))
(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
CROSSREFS
Sequence in context: A119016 A082958 A218495 * A060166 A053634 A094863
KEYWORD
nonn,easy
AUTHOR
Antti Karttunen, Oct 05 2009
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 21 04:19 EDT 2024. Contains 372720 sequences. (Running on oeis4.)