%I #11 Nov 09 2020 00:29:30
%S 1,1,2,3,1,3,4,5,1,5,6,7,2,7,8,9,10,3,10,11,12,1,12,3,12,13,14,15,4,
%T 15,16,17,18,5,18,19,20,21,6,1,20,21,22,23,6,23,24,25,26,7,26,2,26,27,
%U 28,7,28,29,30,31,8,31,32,33,34,9,34,35,36,37,10,37,3
%N Let L_1 = (1, 2, ...); for any n > 0, let M_n = Min_{k > 0} L_n(k) + L_n(k+1) and K_n = Min_{ k | L_n(k) + L_n(k+1) = M_n }, L_{n+1} is obtained by replacing the two terms L_n(K_n) and L_n(K_n+1) by M_n in L_n; a(n) = K_n.
%C In other words, we start with the natural numbers and repeatedly replace the leftmost pair of consecutive terms with minimal sum by its sum; a(n) corresponds to the position of the pair substituted at n-th step.
%H Rémy Sigrist, <a href="/A338764/b338764.txt">Table of n, a(n) for n = 1..10000</a>
%H Rémy Sigrist, <a href="/A338764/a338764.gp.txt">PARI program for A338764</a>
%e The first terms, alongside L_n, are:
%e n a(n) L_n
%e -- ---- ----------------------------------------------------------
%e 1 1 { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, ... }
%e 2 1 { 3, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, ... }
%e 3 2 { 6, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, ... }
%e 4 3 { 6, 9, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, ... }
%e 5 1 { 6, 9, 13, 8, 9, 10, 11, 12, 13, 14, 15, ... }
%e 6 3 { 15, 13, 8, 9, 10, 11, 12, 13, 14, 15, ... }
%e 7 4 { 15, 13, 17, 10, 11, 12, 13, 14, 15, ... }
%e 8 5 { 15, 13, 17, 21, 12, 13, 14, 15, ... }
%e 9 1 { 15, 13, 17, 21, 25, 14, 15, ... }
%e 10 5 { 28, 17, 21, 25, 14, 15, ... }
%o (PARI) See Links section.
%Y Cf. A326936, A338763.
%K nonn
%O 1,3
%A _Rémy Sigrist_, Nov 07 2020