The Linus sequence is a sequence of 1s and 2s starting with 1. At each step, append the digit that minimizes the length of the longest immediately repeated block at the end of the sequence (Balister et al. 2010). The first few terms are 1, 2, 1, 1, 2, 2, 1, 2, 1, 1, 2, 1, 2, 2, ... (OEIS A006345). The Sally sequence gives the length of the run that was avoided.
Linus Sequence
See also
Sally SequenceExplore with Wolfram|Alpha
References
Balister, P.; Kalikow, S.; and Sarkar, A. "The Linus Sequence." Combinatorics, Probability and Computing 19, 21-46, 2010. https://doi.org/10.1017/S0963548309990198.Sloane, N. J. A. Sequence A006345/M0074 in "The On-Line Encyclopedia of Integer Sequences."Sloane, N. J. A. and Plouffe, S. Figure M0126 in The Encyclopedia of Integer Sequences. San Diego, CA: Academic Press, 1995.Referenced on Wolfram|Alpha
Linus SequenceCite this as:
Weisstein, Eric W. "Linus Sequence." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/LinusSequence.html