OFFSET
1,2
COMMENTS
The sequence starts with 1,2,3, this being the earliest triple of three consecutive positive integers which are pairwise coprime. Such triples occur frequently as the sequence extends, and those which end with k = prime p produce a(n) = 2*p and such terms present local spikes in the plot (corresponding primes start 3,7,11,17,31,41,...). Similar behavior is observed in A091857.
A prime can only occur when i,j,k are not pairwise coprime, then a(n) is coprime to j, and so can be a prime.
Conjectured to be a permutation of the positive integers, with primes occurring in natural order.
From Michael De Vlieger, Jul 21 2023: (Start)
The scatterplot exhibits 3 trajectories. From earliest to latest, we see the following:
"Alpha" contains squarefree semiprime a(n) = k such that k > n, k mod 4 = 2. Terms in this sequence are preceded by primes.
"Gamma" contains odd k.
"Beta" contains even composite k such that n > k, including some squarefree semiprimes.(End)
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
Michael De Vlieger, Log log scatterplot of a(n), n = 1..2^12 showing primes in red, composite prime powers in gold, squarefree composites in green, and nonsquarefree numbers that are not prime powers in blue, highlighting squareful numbers that are not prime powers in large light blue.
Michael De Vlieger, Log log scatterplot of a(n), n = 1..2^10, showing three trajectories, alpha in green containing squarefree semiprimes k such that k mod 4 = 2, gamma in blue containing odd numbers, and beta in red containing even numbers not in alpha.
EXAMPLE
a(4) = 6 because 1,2,3 are pairwise coprime and 6 is the smallest unused number sharing a divisor with 3.
a(4,5,6) = 6,4,5 which is not a pairwise coprime triple, so a(7) = 7, the least unused number which is coprime to 4.
MATHEMATICA
nn = 120; c[_] := False; m[_] := 1; h = 1; i = 2; j = 3; u = 4;
Array[Set[{a[#], c[#]}, {#, True}] &, 3];
Do[If[CoprimeQ[h, i, j],
If[PrimePowerQ[j],
k = FactorInteger[j][[1, 1]]; While[c[k m[k]], m[k]++]; k *= m[k],
k = u; While[Or[c[k], CoprimeQ[j, k]], k++] ],
k = u; While[Or[c[k], ! CoprimeQ[i, k]], k++] ];
Set[{a[n], c[k], h, i, j}, {k, True, i, j, k}];
If[k == u, While[c[u], u++]], {n, 4, nn}];
Array[a, nn] (* Michael De Vlieger, Jul 21 2023 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
David James Sycamore, Jul 20 2023
EXTENSIONS
More terms from David A. Corneth, Jul 21 2023
STATUS
approved