login
Lexicographically earliest infinite sequence such that no two equal unordered pairs (a(j), a(k)) have the same distance abs(j-k).
0

%I #21 Oct 14 2024 14:16:32

%S 1,1,2,3,4,2,5,6,3,7,8,4,9,10,11,5,12,13,6,14,15,16,7,17,18,8,19,20,

%T 21,9,22,23,10,24,25,11,26,27,28,12,29,30,13,31,32,33,14,34,35,15,36,

%U 37,16,38,39,40,17,41,42,18,43,44,45,19,46,47,20,48,49,21,50,51,52,22,53,54,23,55,56,57,24,58,59,25,60,61

%N Lexicographically earliest infinite sequence such that no two equal unordered pairs (a(j), a(k)) have the same distance abs(j-k).

%C In other words: The absolute distance between the indices of any two terms (A and B) is distinct among all pairs of terms in the sequence with the same two values (A and B).

%C No value can occur more than twice: 1) If two terms have the same value, one term must be at an odd index and the other at an even index. Otherwise we would have a middle term B equidistant from two equal terms in an ABA-form progression, which contradicts the sequence's definition. 2) So we can have at most one term with a given value at an even index and one at an odd index.

%C Any unordered pair (A, B) has a maximum of 4 distinct distances (A1 to B1, A1 to B2, A2 to B1, A2 to B2).

%C For the equivalent sequence using ordered pairs, see A337226.

%e a(7)=5: We cannot have a(7)=1 because then, for example, the unordered pair (1,2) would have the same absolute distance twice at distinct indices:

%e 1, 1, 2, 3, 4, 2, 1

%e 1--2 2--1

%e a(7) could not equal 2 because again the pair (1,2) would have the same absolute distance twice at different indices (i=6-1=5 and i=7-2=5):

%e 1, 1, 2, 3, 4, 2, 2

%e 1--------------2

%e 1--------------2

%e a(7) cannot be 3 because of the following two equal unordered pairs, which would have the same distance:

%e 1, 1, 2, 3, 4, 2, 3

%e 2--3 2--3

%e a(7) cannot be 4, or we would have two equal unordered pairs both with distance 1:

%e 1, 1, 2, 3, 4, 2, 4

%e 4--2

%e 2--4

%e a(7) can be 5 without restriction since 5 is a first occurrence and every unordered pair with 5 has a distinct distance.

%Y Cf. A337226, A366691, A357256.

%Y Cf. A136119, A184119 (conjectured first and second occurrences).

%K nonn

%O 1,3

%A _Neal Gersh Tolunsky_, Jan 22 2024