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!)
A174314 Sequence given by a(0)=1, a(1)=2 and the recurrence relation: a(n)=a(abs(floor(0.5*n-a(n-2)))) for n>=2. 2
1, 2, 1, 2, 2, 1, 2, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

We observe that the numbers of 1 obtained (between the 2), that is 1, 1, 1, 2, 6, 10, 18, define a sequence v for which v(n)=2^(n-2)+2 for n>=5. In the same vein, the numbers of 2 define a sequence w: 1, 2, 1, 5, for which w(n)=7*2^(n-3)-2. This explain the explicit formulas.

LINKS

Table of n, a(n) for n=0..104.

FORMULA

For p>=1, if 9*2^p-4<=n<=11*2^p-3, then a(n)=1. For p>=0, if 11*2^p-2<=n<=9*2^(p+1)-5, then a(n)=2.

EXAMPLE

a(2)=a(abs(floor(1-1)))=a(0)=1. a(3)=a(abs(floor(1.5-2)))=a(abs(floor(-0.5)))=a(abs(-1))=a(1)=2. a(4)=a(2-a(2))=a(1)=2. If 9*2-4<=n<=11*2-3, that is 14<=n<=19 then a(n)=1. If 11*2-2<=n<=9*2^2-5 that is 20<=n<=31 then a(n)=2.

MAPLE

u(0):=1:u(1):=2: for n from 2 to 10000 do u(n):=u(abs(floor((1/2)*n-u(n-2)))):od:seq(u(n), n=0..10000);

CROSSREFS

Sequence in context: A100429 A049710 A025143 * A237253 A080634 A109925

Adjacent sequences:  A174311 A174312 A174313 * A174315 A174316 A174317

KEYWORD

easy,nonn

AUTHOR

Richard Choulet, Mar 15 2010

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 May 12 10:54 EDT 2021. Contains 343821 sequences. (Running on oeis4.)