login
A384503
Lexicographically earliest infinite sequence of distinct positive integers having the property that for any pair a(n-2) = i, a(n-1) = j of consecutive terms > 1, a(n) is the smallest novel k such that gcd(i,k) > 1 if gcd(i,j) = 1 or gcd(j,k) = 1 if gcd(i,j) > 1.
1
1, 2, 3, 4, 6, 5, 8, 10, 7, 12, 14, 9, 16, 15, 18, 11, 20, 22, 13, 24, 26, 17, 28, 34, 19, 30, 38, 21, 32, 27, 36, 23, 33, 46, 39, 40, 42, 25, 35, 29, 45, 58, 48, 31, 44, 62, 37, 50, 74, 41, 52, 82, 43, 54, 86, 47, 56, 94, 49, 60, 63, 53, 51, 106, 57, 64, 66, 59
OFFSET
1,2
COMMENTS
Three initial terms (1,2,3) are needed since starting 1,2 would require 1 to have a prime factor.
Similar to A280985 except that if for some m, a(m) = prime p, then a(m+2) = 2*p (whereas A280985(m+1) = 2*p).
Conjectured to be a permutation of the positive integers, with primes occurring in order.
LINKS
Michael De Vlieger, Log log scatterplot of a(n), n = 1..2^10, showing primes in red, prime powers in gold, squarefree composites in green, and numbers neuther squarefree nor prime powers in blue and magenta, with magenta additionally representing powerful numbers that are not prime powers.
Michael De Vlieger, Log log scatterplot of a(n), n = 1..2^20.
FORMULA
For prime a(n) = p, a(n+2) = 2*p. - Michael De Vlieger, May 31 2025
EXAMPLE
The lexicographically earliest condition requires that the sequence starts a(n) = n for n <= 3. Then with a(2) = 2 and a(3) = 3 a(4) must be 4, the smallest novel number sharing a prime divisor with 2 (since gcd(2,3) = 1). Since gcd(3,4) = 1, a(5) must be 6, the smallest novel number sharing a prime divisor with 3. Since gcd(4,6) > 1 a(6) = 5, the smallest novel number prime to a(4) = 4. a(8) = 8 because gcd(6,5) = 1 and then a(9) = 2*5 = 10 the smallest novel number sharing a factor with 5.
MATHEMATICA
nn = 120; c[_] := False; m[_] := 1; c[1] = c[2] = c[3] = True; i = 2; j = 3; u = 4;
Range[3]~Join~Reap[Do[
If[CoprimeQ[i, j],
If[PrimePowerQ[i],
p = FactorInteger[i][[1, 1]]; While[c[p*m[p]], m[p]++]; k = p*m[p],
k = u; While[Or[c[k], CoprimeQ[i, k]], k++] ],
k = u; While[Or[c[k], ! CoprimeQ[j, k]], k++] ];
Sow[k]; Set[{c[k], i, j}, {True, j, k}];
If[k == u, While[c[u], u++]], {n, 3, nn}] ][[-1, 1]] (* Michael De Vlieger, May 31 2025 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved