login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A112387 a(1)=1, a(2)=2, a(n)= 2^(n/2) if even and a(n-1)-a(n-2) if odd. 2
1, 2, 1, 4, 3, 8, 5, 16, 11, 32, 21, 64, 43, 128, 85, 256, 171, 512, 341, 1024, 683, 2048, 1365, 4096, 2731, 8192, 5461, 16384, 10923, 32768, 21845, 65536, 43691, 131072, 87381, 262144, 174763, 524288, 349525, 1048576, 699051, 2097152, 1398101 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

This sequence originated from the Fibonacci sequence, but instead of adding the last two terms, you get the average. Example, if you have the initial condition a(1)=x and a(2)=y, a(3)=(x+y)/2, a(4)=(x+3y)/4, a(5)=(3x+5y)/8, a(6)=(5x+11y)/16 and so on and so forth. I used the coefficients of x and y as well as the denominator.

Consider b(n)= 1, a(n) = 1, 1, 2, 1, 4, 3, 8, 5, 16, 11, 32, 21. (1) A000079 is full, A001045 is without 0. (2) b(2n) and b(2n+1) swapped gives 1, 1, 1, 2, 3, 4, 5, 8 = A135318. (3) 10*b(2n)+b(2n+1)= 11, 21, 43, 85, 171 = A001045(n+5). (4) b(n) differences = 0, 1, -1, 3, -1, 5, -3, 11, -5, 21: mixed Jacobsthal -A001045(n), A001045(n+2). See A117576. - Paul Curtz, Sep 09 2008

LINKS

Harvey P. Dale, Table of n, a(n) for n = 1..1000

FORMULA

a(n)=2^(n/2) if n is even, a(n)=a(n-1)-a(n-2) if n is odd and with initial condition of a(1)=1. The limit of a(n)/a(n+1) as n approaches infinity oscillates at a value of 3/2 and 1/3.

a(2n)=A000079(n), a(2n-1)=A001045(n).

MATHEMATICA

a[1] = 1; a[2] = 2; a[n_] := a[n] = If[ EvenQ[n], 2^(n/2), a[n - 1] - a[n - 2]]; Array[a, 43] (* Robert G. Wilson v *)

nxt[{n_, a_, b_}]:={n+1, b, If[OddQ[n], 2^((n+1)/2), b-a]}; NestList[nxt, {2, 1, 2}, 50][[All, 2]] (* Harvey P. Dale, Jul 08 2019 *)

CROSSREFS

Sequence in context: A106625 A275902 A008347 * A193174 A126084 A294022

Adjacent sequences:  A112384 A112385 A112386 * A112388 A112389 A112390

KEYWORD

nonn

AUTHOR

Edwin F. Sampang, Dec 05 2005

EXTENSIONS

Edited and extended by Robert G. Wilson v, Dec 05 2005

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 10 17:00 EDT 2021. Contains 342852 sequences. (Running on oeis4.)