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!)
A209281 Start with first run [0,1] then, for n >= 2, the n-th run has length 2^n and is the concatenation of [a(1),a(2),...,a(2^n/2)] and [n-a(1),n-a(2),...,n-a(2^n/2)]. 2
0, 1, 2, 1, 3, 2, 1, 2, 4, 3, 2, 3, 1, 2, 3, 2, 5, 4, 3, 4, 2, 3, 4, 3, 1, 2, 3, 2, 4, 3, 2, 3, 6, 5, 4, 5, 3, 4, 5, 4, 2, 3, 4, 3, 5, 4, 3, 4, 1, 2, 3, 2, 4, 3, 2, 3, 5, 4, 3, 4, 2, 3, 4, 3, 7, 6, 5, 6, 4, 5, 6, 5, 3, 4, 5, 4, 6, 5, 4, 5, 2, 3, 4, 3, 5, 4, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

LINKS

Table of n, a(n) for n=1..87.

FORMULA

Let T(n)=A010060(n) then for n>=1 a(2n)=a(n)+1-T(n-1) and a(2n+1)=a(n+1)+T(n).

For n>=2 a(n)=a(ceiling(n/2))+T(n-1) hence:

a(n)=sum(k=0..ceiling(log(n-1)/log(2)),T(floor((n-1)/2^k)))

For k>=0 a(3*2^k+1)=1 (more precisely a(n)=1 iff n is in A103204), a(2^k+1)=k+1, a(5*2^k+1)=2, a(7*2^k+1)=k+2 etc.

EXAMPLE

[0,1] -> [0,1] U [2-0,2-1] =

[0,1,2,1] -> [0,1,2,1] U [3-0,3-1,3-2,3-1] =

[0,1,2,1,3,2,1,2] etc.

PROG

(PARI)/* compute 2^15 terms */ v=[0, 1]; for(n=2, 15, v=concat(v, vector(2^n/2, i, n-v[i])); a(n)=v[n]; )

CROSSREFS

Cf. A010060.

Sequence in context: A261867 A076081 A304089 * A240554 A107338 A118123

Adjacent sequences:  A209278 A209279 A209280 * A209282 A209283 A209284

KEYWORD

nonn

AUTHOR

Benoit Cloitre, Jan 16 2013

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 July 9 16:50 EDT 2020. Contains 335545 sequences. (Running on oeis4.)