OFFSET
1,2
COMMENTS
The terms studied are all concentrated along lines of different gradient; the odd terms all being on the line a(n) = n or very close to it, while the even terms are distributed among the other lines dependent on the number of prime factors they contain. It is conjectured that this behavior is true for all n. The topmost line contains even semiprimes while the lower lines, those with gradient less than 1, contain powers of 2 multiplied by a larger single prime. However the topmost of these lower lines, which is more diffuse, also contains all other even numbers. Also noticeable is some of the lower lines terminating after which these values appear to move into the line contains all other even numbers.
Many odd terms are fixed points, this not occurring only when such a number would share a factor with the previous even number. This first occurs at a(65) = 67, when 65 cannot be chosen as it would share a factor with a(64) = 60.
The term selection rules would allow for consecutive odd numbers although this never occurs in the terms studied and is unlikely to ever occur. Likewise for the terms studied all primes appear in their natural order. No power of 2, other than 2 itself, can be a term.
From Michael De Vlieger, Jun 11 2024: (Start)
Conjecture: Odd prime p precedes 2*p.
LINKS
Scott R. Shannon, Table of n, a(n) for n = 1..10000
Michael De Vlieger, Plot f(a(n)) in rows of 210 terms, n = 1..16380, where color function f renders primes in red, perfect prime powers in gold, squarefree composites in greens, and numbers neither squarefree nor prime powers in blue or purple, where purple additionally signifies powerful numbers that are not prime powers. Bright green represents a primorial, yellow green an even squarefree semiprime, olive green an odd squarefree semiprime, and dark green other squarefree composites. Shows pattern of primes a(n) = p followed by even squarefree semiprimes 2*p, generally where n mod A002110(k) is a reduced residue. The lower image plots f(n), only showing primes in their place for comparison.
Scott R. Shannon, Image of the first 100000 terms. Numbers with one, two, three, four, or five and more prime factors, counted with multiplicity, are show as red, yellow, green, blue and violet respectively. The white line is a(n) = n.
Scott R. Shannon, Image of the first 100000 terms. As above except here the colors show the number of distinct prime factors.
EXAMPLE
a(7) = 7 as a(6) = 10 is an even number and 7 is the smallest unused positive that is coprime to 10.
MATHEMATICA
kk = 2; nn = 120; c[_] := False; Array[Set[{a[#], c[#]}, {#, True}] &, kk];
j = a[kk]; u = kk + 1;
Do[If[OddQ[j],
If[PrimePowerQ[j],
p = FactorInteger[j][[1, 1]];
k = #1 + Boole[#2 > 0] & @@ QuotientRemainder[u, p];
While[c[k p], k++]; k *= p,
k = u; While[Or[c[k], CoprimeQ[j, k]], k++]],
k = u; While[Or[c[k], ! CoprimeQ[j, k]], k++] ];
Set[{a[n], c[k], j}, {k, True, k}];
If[k == u, While[c[u], u++]], {n, kk + 1, nn}];
Array[a, nn] (* Michael De Vlieger, Jun 11 2024 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Scott R. Shannon, Jun 09 2024
STATUS
approved