%I #11 Oct 21 2022 15:12:14
%S 1,4,2,10,6,22,7,8,12,3,26,74,14,9,46,122,15,16,17,18,19,5,21,11,20,
%T 24,25,13,82,27,30,183,35,28,31,32,34,142,33,36,38,158,40,166,39,42,
%U 44,49,194,45,50,202,48,303,51,52,54,37,55,56,29,57,63,58,60,65
%N Lexicographically earliest infinite sequence of distinct positive integers such that a(n+1) is the least k != j, for which gcd(k, j) > 1; j = n + a(n).
%C If n + a(n) = prime p, a(n+1) is the smallest multiple (>1) of p, which has not occurred earlier. Conjectured to be a permutation of the positive integers.
%H Michael De Vlieger, <a href="/A357595/a357595.png">Log-log scatterplot of a(n)</a>, n = 1..2^14, labeling records in red and local minima in blue, highlighting primes in green and (composite) prime powers in gold.
%e a(1)=1, then 1+a(1)=2 so a(2) must be 4, the least k != 2 which shares a divisor with 2.
%t nn = 66; c[_] = False; u = 2; a[1] = j = 1; c[1] = True; Do[Set[{k, m}, {u, n + j - 1}]; While[Or[c[k], k == m, CoprimeQ[k, m]], k++]; Set[{a[n], c[k], j}, {k, True, k}]; If[k == u, While[c[u], u++]], {n, 2, nn}]; Array[a, nn] (* _Michael De Vlieger_, Oct 05 2022 *)
%Y Cf. A347113, A349472.
%K nonn
%O 1,2
%A _David James Sycamore_, Oct 05 2022
|