This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A281579 #55 Feb 17 2025 21:29:04 %S A281579 2,2,3,3,3,4,5,4,3,3,3,3,4,5,6,7,6,5,4,4,4,3,2,2,2,3,4,4,4,4,5,6,7,8, %T A281579 7,6,5,4,3,3,3,3,3,3,3,4,5,6,7,8,7,6,5,4,4,4,4,5,6,7,6,5,4,4,4,2,2,3, %U A281579 3,3,4,5,6,5,4,3,3,3,3,4,5,6,5,4,3,2,2 %N A281579 Lexicographically earliest sequence such that, for any n>0, a(n)=length of the n-th run of consecutive terms in arithmetic progression in this sequence. %C A281579 Runs of consecutive terms in arithmetic progression overlap: the last term of the n-th run corresponds to the first term of the (n+1)-st run. %C A281579 See A281772 for the common difference of the n-th run of consecutive terms in arithmetic progression. %C A281579 See A281783 for the index of the first term of the n-th run of consecutive terms in arithmetic progression. %C A281579 See A281900 for the index of the first occurrence of n in the sequence. %C A281579 We can show that: %C A281579 1) a(n)>=2 for any n>0, %C A281579 2) a(n+1)<=a(n)+1 for any n>0, %C A281579 3) runs of consecutive 2's have at least length 2. %C A281579 Conjectures: %C A281579 4) there are infinitely many runs of consecutive 2's, %C A281579 5) the sequence is unbounded. %C A281579 This sequence has connections with the Kolakoski sequence (A000002) and Golomb's sequence (A001462) in the sense that they all establish a link between their terms and the lengths of inner runs. %C A281579 This sequence has similarities with A113138. - _Rémy Sigrist_, Feb 08 2017 %C A281579 A380317 is an essentially identical sequence. - _N. J. A. Sloane_, Feb 17 2025 %H A281579 Rémy Sigrist, <a href="/A281579/b281579.txt">Table of n, a(n) for n = 1..10000</a> %H A281579 Rémy Sigrist, <a href="/A281579/a281579.gp.txt">PARI program for A281579</a> %e A281579 a(1)=2 fits the definition (and a(1)=1 would not, because whatever a(2) is, (a(1),a(2)) is an arithmetic progression of length 2). %e A281579 a(2)=2 also fits the definition. %e A281579 (a(1), a(2)) constitutes the first run, and has length a(1)=2. %e A281579 a(3) cannot equal 2 (as it would extend the previous run). %e A281579 a(3)=3 fits the definition. %e A281579 (a(2),a(3)) constitutes the second run, and has length a(2)=2. %e A281579 a(4) cannot equal 2 (as a(5) would be equal to 1, which is impossible). %e A281579 a(4)=3 fits the definition. %e A281579 We complete the 3rd run with a(5)=3. %Y A281579 Cf. A000002, A001462, A113138, A281772, A281783, A281900, A380317. %K A281579 nonn %O A281579 1,1 %A A281579 _Rémy Sigrist_, Jan 29 2017