login
Lexicographically earliest sequence of positive integers such that for any n > 0, a(n) = a(2*n), a(n) and a(n+1) are coprime, and all pairs of adjacent terms are distinct.
2

%I #10 Dec 16 2023 08:59:36

%S 1,1,2,1,3,2,3,1,4,3,5,2,5,3,4,1,5,4,7,3,7,5,7,2,9,5,8,3,11,4,5,1,6,5,

%T 9,4,9,7,10,3,8,7,8,5,6,7,9,2,11,9,11,5,11,8,11,3,10,11,7,4,13,5,12,1,

%U 7,6,17,5,13,9,13,4,17,9,10,7,1,10,13,3,13

%N Lexicographically earliest sequence of positive integers such that for any n > 0, a(n) = a(2*n), a(n) and a(n+1) are coprime, and all pairs of adjacent terms are distinct.

%C This sequence has similarities with Stern's diatomic series (A002487) as it equals its even bisection and two consecutive terms are always coprime.

%C Will n -> (a(n), a(n+1)) run through all pairs of coprime integers?

%H Rémy Sigrist, <a href="/A368147/a368147.png">Colored scatterplot of (a(n), a(n+1)) for n < 2^18</a> (where the color is function of n)

%H Rémy Sigrist, <a href="/A368147/a368147.gp.txt">PARI program</a>

%e The first terms, alongside pairs of successive terms following the introduction of odd-indexed terms, are:

%e n a(n) New pairs

%e -- ---- --------------

%e 1 1 (1, 1)

%e 2 1

%e 3 2 (1, 2), (2, 1)

%e 4 1

%e 5 3 (1, 3), (3, 2)

%e 6 2

%e 7 3 (2, 3), (3, 1)

%e 8 1

%e 9 4 (1, 4), (4, 3)

%e 10 3

%e 11 5 (3, 5), (5, 2)

%e 12 2

%e 13 5 (2, 5), (5, 3)

%e 14 3

%o (PARI) See Links section.

%Y Cf. A002487, A368071.

%K nonn

%O 1,3

%A _Rémy Sigrist_, Dec 13 2023