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).
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, 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, 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
Offset: 1
Keywords
Examples
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
References
- Mathematische Semesterberichte 44 94 1997.
Links
- Jean-Christophe Hervé, Table of n, a(n) for n = 1..10000
- Sean A. Irvine, Java program (github)
Programs
-
R
seq <- function(n) { k2<- k1 <- rep(0,n+2) c1<-w2<- 1 w1<-c2<-k1[1]<-2 while(w2<=n){ while(c1
Jean-Christophe Hervé, Oct 21 2014
Formula
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
Extensions
Definition rewritten by Jean-Christophe Hervé, Oct 21 2014
Comments