OFFSET
1,2
COMMENTS
Similar to the Yellowstone permutation A098550 the next term can be chosen just by satisfying the conditions of sharing a factor with the second largest previous term and not with the largest previous term. When such a term is smaller than the second largest previous term then it can take any value not previously seen as it will not influence subsequent terms in the sequence. This means such terms can be prime or prime powers. If instead the term is larger than the second largest previous term then, as a result of the required factor sharing conditions, it will always have prime factors not in common with the current largest term. This means a following term can always be found and no other conditions on the prime factors of the term are required. This is in contrast to A351496 where additional restriction on the prime factors of the next term need to be enforced to ensure the sequence is infinite.
The primes occur in their natural order, and in general are not divisors of the previous or following term. The sequence is conjectured to be a permutation of the positive integers although it takes many terms for some values to appear, e.g., a(176478) = 42. In the first 200000 terms the fixed points beyond 4 are 7968 and 18552, although it is possible more exist.
LINKS
Scott R. Shannon, Image of the first 50000 terms. The green line is y = n.
Scott R. Shannon, Image of the first 200000 terms. The green line is y = n. The large drop in value occurs at a(176478) = 42.
EXAMPLE
a(6) = 8 as the largest and second largest previous terms are a(5) = 9 and a(4) = 4 respectively, and 8 is the smallest unused number that shares a factor with 4 and not with 9.
a(9) = 5 as the largest and second largest previous terms are a(8) = 21 and a(7) = 10 respectively, and 5 is the smallest unused number that shares a factor with 10 and not with 21.
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Scott R. Shannon, May 03 2022
STATUS
approved