%I #35 Nov 08 2021 12:13:31
%S 1,8,11,2,7,9,20,12,15,3,28,13,19,10,16,21,37,17,51,23,27,4,53,24,33,
%T 14,29,34,47,25,101,30,38,22,43,31,116,18,44,39,58,45,63,48,52,5,99,
%U 49,59,54,68,60,81,55,64,50,73,35,136,56,146,26,65,69,72,66,159,74,77,70,153
%N When k appears in A347113, or -1 if k never appears.
%C It is conjectured that every positive number appears in A347113. - _N. J. A. Sloane_, Nov 08 2021
%H Michael De Vlieger, <a href="/A347306/b347306.txt">Table of n, a(n) for n = 1..10000</a> (first 3330 terms from N. J. A. Sloane)
%H Hugo Pfoertner, <a href="/A347306/a347306.txt">Table of n, a(n) for n = 1..132708</a>
%H Hugo Pfoertner, <a href="/A347306/a347306.pdf">Illustration of terms corresponding to first 400000 terms of A347113</a>, use zoom to see details.
%t With[{s = Import["https://oeis.org/A347113/b347113.txt", "Data"][[All, -1]]}, Array[FirstPosition[s, #][[1]] &, 71]] (* _Michael De Vlieger_, Sep 01 2021 *)
%o (Python)
%o from math import gcd
%o def A347306(n):
%o if n == 1:
%o return 1
%o i, j, nset, m = 1, 2, {1}, 2
%o while True:
%o k = m
%o i += 1
%o while k == j or gcd(k,j) == 1 or k in nset:
%o k += 1
%o if k == n:
%o return i
%o j = k+1
%o nset.add(k)
%o while m in nset:
%o m += 1 # _Chai Wah Wu_, Sep 02 2021
%Y Cf. A347113.
%K nonn
%O 1,2
%A _N. J. A. Sloane_, Sep 01 2021