OFFSET
1,2
COMMENTS
The overall size of the graph of the terms is dominated by terms which are the product of two preceding prime terms, the first example being a(15) = 77; there are 35 such products in the first 10000 terms. For terms less than 3*n the graph shows the terms are concentrated along various lines, with the upper terms all being semiprimes - see the attached colored image.
For the terms studied the primes, other than 3 and 5, appear in their natural order, and the only two fixed points are the first two terms. The sequence is conjectured to be a permutation of the positive numbers.
LINKS
Scott R. Shannon, Table of n, a(n) for n = 1..10000
Scott R. Shannon, Image of the first 20000 terms for a(n) <= 60000. The colors are graduated across the spectrum to show the total number of prime factors of each term, with red being one prime factor. The thin green line is a(n) = n.
EXAMPLE
a(12) = 15 as a(11) = 20 > a(10) = 18, and 15 is the smallest unused number that shares a factor with both 20 and 18.
a(13) = 7 as a(12) = 15 < a(11) = 20, and 7 is the smallest unused number that is coprime to both 15 and 20.
MATHEMATICA
s={1, 2, 4}; Do[If[s[[-1]]>s[[-2]], AppendTo[s, m=2; Until[!CoprimeQ[s[[-1]], m]&&!CoprimeQ[s[[-2]], m]&&!MemberQ[s, m], m++]; m], AppendTo[s, m=2; Until[CoprimeQ[s[[-1]], m]&&CoprimeQ[s[[-2]], m]&&!MemberQ[s, m], m++]; m]], {i, 63}]; s (* James C. McMahon, Sep 13 2025 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Scott R. Shannon, Sep 05 2025
STATUS
approved
