OFFSET
1,2
COMMENTS
No term can be a prime power as each term must contain at least two distinct prime factors. This make the sequence similar to A360519 and A361606. A close examination of the lines of concentrated terms, see the attached images, shows they have a slight downward curvature. In the first 250000 terms the only fixed points are 1, 69, 87, 116825, although it is possible more exist for very large values of n.
LINKS
Scott R. Shannon, Table of n, a(n) for n = 1..10000
Michael De Vlieger, Log log scatterplot of a(n), n = 1..2^12, showing squarefree composites in green, numbers neither squarefree nor prime powers in blue, and numbers in A286708 in large light blue.
Scott R. Shannon, Image of the first 250000 terms. The green line is a(n) = n.
Scott R. Shannon, Image of the first 250000 terms in color. Terms with a lowest prime factor 2, 3, 5, 7, 11, >=13 are colored white, red, yellow, green, blue, violet and light gray respectively.
EXAMPLE
a(3) = 10 as a(2) = 6 = 2*3, and 10 is the smallest unused number that shares a factor with 6 while also containing 5 as a prime factor, the smallest prime not a factor of 6.
a(4) = 12 as a(3) = 10 = 2*5, and 12 is the smallest unused number that shares a factor with 10 while also containing 3 as a prime factor, the smallest prime not a factor of 10.
MATHEMATICA
nn = 120; c[_] := False; m[_] := 2; MapIndexed[Set[{a[First[#2]], c[#1]}, {#1, True}] &, {1, 6}]; j = a[2]; Do[q = 2; While[Divisible[j, q], q = NextPrime[q]]; k = m[q]; While[Or[c[#], PrimePowerQ[#], CoprimeQ[j, k]] &[q k], k++]; k *= q; While[c[m[q] q], m[q]++]; Set[{a[n], c[k], j}, {k, True, k}], {n, 3, nn}]; Array[a, nn] (* Michael De Vlieger, May 02 2023 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Scott R. Shannon, May 02 2023
STATUS
approved