OFFSET
1,2
COMMENTS
The sequence definition is related to those of A098550 and A336957 in the sense that the next term a(n) is chosen according to whichever of the two criteria delivers the least unused number, subject to the rad condition.
The rule that rad(k) != rad(a(n-1)) is necessary to ensure that the next term always exists (see Example).
Odd primes p appear as 2*p, p, u where u is the least unused even term.
Conjectured to be a permutation of the positive integers in which the primes appear in natural order.
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..16384
Michael De Vlieger, Log log scatterplot of a(n), n = 1..2^12, showing primes in red, other prime powers in gold, squarefree composites in green, and numbers neither squarefree nor prime powers in blue, highlighting numbers in A286708 in large light blue.
EXAMPLE
With a(1) = 1 and a(2) = 2, the least k prime to 1 but not to 2 would be 4, but this will not work because rad(2) = rad(4), preventing selection of the next term a(4). Therefore a(3) is 6, which is prime to 1 but not to 2. The next term, a(4) is 3, the smallest number prime to 2 but not to 6. a(5) cannot be 9 because rad(3) = rad(9) but 4 fits, being prime to 3 but not to 6; and so on.
MATHEMATICA
nn = 120; c[_] = False;
rad[x_] := rad[x] = Times @@ FactorInteger[x][[All, 1]];
Array[Set[{a[#], c[#]}, {#, True}] &, 2]; i = a[1]; j = a[2]; u = 3;
Do[k = u;
While[
Nand[! c[k], Xor[CoprimeQ[k, i], CoprimeQ[k, j]],
rad[j] != rad[k]], k++];
Set[{a[n], c[k], i, j}, {k, True, j, k}];
If[k == u, While[c[u], u++]], {n, 3, nn}];
Array[a, nn] ] (* Michael De Vlieger, Apr 27 2023 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
David James Sycamore, Apr 24 2023
STATUS
approved