login
Lexicographically earliest sequence of nonnegative integers such that the doubly-infinite symmetric sequence b defined by b(n) = b(-n) = a(n) for any n >= 0 has no three equidistant equal terms.
3

%I #17 Jan 07 2024 16:28:56

%S 0,1,1,2,2,3,2,1,1,3,3,4,3,2,4,4,3,2,3,1,1,3,4,4,2,1,1,2,4,5,5,6,5,5,

%T 2,3,6,6,4,5,4,5,5,3,5,6,4,4,6,2,6,7,7,8,7,1,1,5,6,2,5,1,1,2,3,5,2,5,

%U 5,3,2,7,3,1,1,6,6,7,3,1,1,6,6,3,6,4,2

%N Lexicographically earliest sequence of nonnegative integers such that the doubly-infinite symmetric sequence b defined by b(n) = b(-n) = a(n) for any n >= 0 has no three equidistant equal terms.

%C This sequence is a variant of A006997.

%C By Van der Waerden's theorem, this sequence is unbounded.

%H Rémy Sigrist, <a href="/A368798/b368798.txt">Table of n, a(n) for n = 0..10000</a>

%H Rémy Sigrist, <a href="/A368798/a368798.txt">C++ program</a>

%e For n = 5:

%e - the first 5 terms of the sequence are: 0, 1, 1, 2, 2,

%e - a(5) cannot equal 0 as we would have b(-5) = b(0) = b(5),

%e - a(5) cannot equal 1 as we would have b(-1) = b(2) = b(5),

%e - a(5) cannot equal 2 as we would have b(3) = b(4) = b(5),

%e - we chose a(5) = 3 as this does not induce tree equidistant equal terms.

%o (C++) See Links section.

%Y Cf. A006997, A368795, A368808 (indices of records).

%K nonn,look

%O 0,4

%A _Rémy Sigrist_, Jan 06 2024