login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A293838 "Look once to the left" sequence starting with 1,2 (see comment). 0
1, 2, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 2, 1, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Stage 0: we start from 1,2.

Stage 1: we add one copy of the block to the left of the last term (here the block 1) giving 1,2,1.

Stage 2: we add one copy of the block to the left of the last term (here the block 1,2) giving 1,2,1,1,2.

Stage 3: we add one copy of the block to the left of the last term (here the block 1,2,1,1) giving 1,2,1,1,2,1,2,1,1.

Iterate the process.

At stage n there are 2^n+1 terms.

LINKS

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

FORMULA

(a(1)+a(2)+...+a(n))/n-->1.354... as n-->infty

MATHEMATICA

Nest[Join[#, Take[#, Length@ # - 1]] &, {1, 2}, 7] (* Michael De Vlieger, Oct 18 2017 *)

PROG

(PARI) v=[1, 2]; for(n=1, 10, l=length(v); w=vector(l-1, i, v[i]); v=concat(v, if(v[l]-1, concat(w), w))); a(n)=v[n];

CROSSREFS

Cf. A293630, A293811.

Sequence in context: A131774 A078316 A207668 * A055443 A003842 A095771

Adjacent sequences:  A293835 A293836 A293837 * A293839 A293840 A293841

KEYWORD

nonn

AUTHOR

Benoit Cloitre, Oct 17 2017

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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 21 17:10 EDT 2018. Contains 316427 sequences. (Running on oeis4.)