login
Lexicographically earliest infinite sequence of distinct positive numbers such that a(2*n) > a(2*n-1) and a(2*n) > a(2*n+1) and all neighboring terms are coprime.
1

%I #17 Sep 07 2025 12:17:36

%S 1,3,2,5,4,7,6,11,8,13,9,16,15,17,10,19,12,23,14,25,18,29,20,27,22,31,

%T 21,34,33,35,24,37,26,41,28,39,32,43,30,47,36,49,38,45,44,51,40,53,42,

%U 55,46,57,50,59,48,61,52,63,58,65,54,67,56,69,62,71,60,73

%N Lexicographically earliest infinite sequence of distinct positive numbers such that a(2*n) > a(2*n-1) and a(2*n) > a(2*n+1) and all neighboring terms are coprime.

%C Similar to the sequence where all neighboring terms share a factor, see A387094.

%C As the sequence is required to be infinite, any candidate for a(2*n) must be checked to ensure it has a lower unused number that is coprime to it. See the examples below.

%C Other than the initial primes 3 and 2, for the terms studied all other primes appear in their natural order. Surprisingly, even though all terms are approximately n, there are no fixed points in the first 10^6 terms and it is unknown if any exist.

%C The sequence is conjectured to be a permutation of the positive integers.

%H Scott R. Shannon, <a href="/A387232/b387232.txt">Table of n, a(n) for n = 1..10000</a>

%e a(4) = 5 as 5 > a(3) = 2 while being the smallest unused number coprime to 2 and having a smaller unused number, namely 4, that is coprime to it.

%e a(10) = 13 as 13 > a(9) = 8 while being the smallest unused number coprime to 8 and having a smaller unused number, namely 9, that is coprime to it. Note that 9 is unused and coprime to 8, but choosing 9 would halt the sequence as there is no number less than 9 that is unused and coprime to it.

%Y Cf. A387094, A064413, A082746, A373545.

%K nonn

%O 1,2

%A _Scott R. Shannon_, Aug 23 2025