login
A387231
a(1) = 1, a(2) = 2; for n > 2, a(n) is the smallest unused positive number that shares a factor with a(n-1) if a(n-1) > a(n-2), else it is coprime to a(n-1) if a(n-1) < a(n-2).
8
1, 2, 4, 6, 3, 5, 10, 8, 7, 9, 12, 14, 16, 18, 15, 11, 13, 26, 20, 17, 19, 38, 22, 21, 23, 46, 24, 25, 30, 27, 28, 32, 34, 36, 33, 29, 31, 62, 40, 37, 35, 39, 42, 44, 48, 45, 41, 43, 86, 50, 47, 49, 56, 52, 51, 53, 106, 54, 55, 60, 57, 58, 64, 66, 63, 59, 61
OFFSET
1,2
COMMENTS
The sequence is composed of two main lines of terms, the upper being even semiprimes, while the lower contains all other terms. For the terms studied the primes appear in their natural order.
In the first 100000 terms the fixed points are 1, 2, 8, 15, 32, 44, 50, 60, 90, 182, 198, 220; it is likely no more exist. The sequence is conjectured to be a permutation of the positive integers.
LINKS
EXAMPLE
a(4) = 6 as a(3) = 4 > a(2) = 3, and 6 is the smallest unused number that shares a factor with 4.
a(6) = 5 as a(5) = 3 < a(4) = 6, and 5 is the smallest unused number that is coprime to 3.
CROSSREFS
KEYWORD
nonn
AUTHOR
Scott R. Shannon, Aug 23 2025
STATUS
approved