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!)
A025142 Fixed point of the square runlength transform, with a(1) = 1 (the runlength transform of a binary sequence is the sequence of the lengths of its runs). 12

%I #23 Aug 10 2019 23:46:59

%S 1,1,2,1,1,2,2,1,2,2,1,2,1,1,2,2,1,2,2,1,1,2,1,2,2,1,2,1,1,2,1,1,2,2,

%T 1,2,1,1,2,1,2,2,1,1,2,1,1,2,1,2,2,1,2,1,1,2,2,1,2,2,1,1,2,1,1,2,1,2,

%U 2,1,2,2,1,1,2,1,2,2,1,2,1,1,2,1,1,2,2,1,2,2,1,1,2,1,2,2,1,2,2,1,1,2,1,1,2,1,2,2,1,2,1

%N Fixed point of the square runlength transform, with a(1) = 1 (the runlength transform of a binary sequence is the sequence of the lengths of its runs).

%C Unique sequence a such that a(1) = 1 and RL^2(a) = a != RL(a), where for any sequence s of 1's and 2's, the runlength transform of s RL(s) is such that RL(s)(n) = length of n-th run of same symbols in s; RL(a) is sequence A025143.

%C Conjecture: as for the Kolakoski sequence A000002, which is a fixed point of RL, it remains to be shown that the limiting frequency of 1's and 2's in this sequence is 0.5. - _Jean-Christophe Hervé_, Oct 21 2014

%C Like the Kolakoski sequence, this sequence is cubefree and for this reason some words can never appear like XYXYX. Also, the number of 1's and 2's in any word of length 10 is 4, 5 or 6 (see comments in A000002). - _Jean-Christophe Hervé_, Oct 21 2014

%D Mathematische Semesterberichte 44 94 1997.

%H Jean-Christophe Hervé, <a href="/A025142/b025142.txt">Table of n, a(n) for n = 1..10000</a>

%H Sean A. Irvine, <a href="https://github.com/archmageirvine/joeis/blob/master/src/irvine/oeis/a025/A025142.java">Java program</a> (github)

%F a(n) = run lengths of A025143, and A025143 = run lengths of a(n): this sequence and A025143 form a unique pair of distinct sequences with this property. - _Jean-Christophe Hervé_, Oct 21 2014

%e We illustrate how this sequence and A025143 can be constructed from each other. Start with two 1's in this sequence: a(1) = a(2) = 1 (and thus a(3) = 2), which gives A025143(1) = 2 (first run length of this sequence), followed by a 1 because a(1) = 1 is also the first run length of A025143; thus a(4) = 1, which gives A025143(3) = 2, which in turn gives a(5) = 1 and a(6) = 2, etc. - _Jean-Christophe Hervé_, Oct 21 2014

%o (R) seq <- function(n) {

%o k2<- k1 <- rep(0,n+2)

%o c1<-w2<- 1

%o w1<-c2<-k1[1]<-2

%o while(w2<=n){

%o while(c1<w1) {

%o x<-(c1-1)%%2+1

%o k2[w2]<-x

%o w2<-w2+1

%o if(k1[c1]==2) {

%o k2[w2]<-x

%o w2<-w2+1}

%o c1<-c1+1}

%o while(c2<w2 && w1<=n) {

%o x<-c2%%2+1

%o k1[w1]<-x

%o w1<-w1+1

%o if(k2[c2]==2) {

%o k1[w1]<-x

%o w1<-w1+1}

%o c2<-c2+1}}

%o return(cbind(1:n,k2[1:n]))} _Jean-Christophe Hervé_, Oct 21 2014

%Y A000002, A025143.

%K nonn

%O 1,3

%A _Clark Kimberling_

%E Definition rewritten by _Jean-Christophe Hervé_, Oct 21 2014

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 March 28 14:38 EDT 2024. Contains 371254 sequences. (Running on oeis4.)