login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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.
6

%I #51 Feb 22 2020 20:54:24

%S 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 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 3,3,4,5,6,5,4,3,3,3,3,4,5,6,5,4,3,2,2

%N 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 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)-th run.

%C See A281772 for the common difference of the n-th run of consecutive terms in arithmetic progression.

%C See A281783 for the index of the first term of the n-th run of consecutive terms in arithmetic progression.

%C See A281900 for the index of the first occurrence of n in the sequence.

%C We can show that:

%C 1) a(n)>=2 for any n>0,

%C 2) a(n+1)<=a(n)+1 for any n>0,

%C 3) runs of consecutive 2's have at least length 2.

%C Conjectures:

%C 4) there are infinitely many runs of consecutive 2's,

%C 5) the sequence is unbounded.

%C 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 This sequence has similarities with A113138. - _Rémy Sigrist_, Feb 08 2017

%H Rémy Sigrist, <a href="/A281579/b281579.txt">Table of n, a(n) for n = 1..10000</a>

%H Rémy Sigrist, <a href="/A281579/a281579.gp.txt">PARI program for A281579</a>

%e 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 a(2)=2 also fits the definition.

%e (a(1), a(2)) constitutes the first run, and has length a(1)=2.

%e a(3) cannot equal 2 (as it would extend the previous run).

%e a(3)=3 fits the definition.

%e (a(2),a(3)) constitutes the second run, and has length a(2)=2.

%e a(4) cannot equal 2 (as a(5) would be equal to 1, which is impossible).

%e a(4)=3 fits the definition.

%e We complete the 3rd run with a(5)=3.

%Y Cf. A000002, A001462, A113138, A281772, A281783, A281900.

%K nonn

%O 1,1

%A _Rémy Sigrist_, Jan 29 2017