OFFSET
1,2
COMMENTS
This sequence uses a similar rule to A354688 but here the sign of the difference between a(n-1) and a(n) is considered. This leads to the terms showing much more erratic behavior than A354688; see the linked image.
In the first 200000 terms the fixed points are 1,2,8,35, and it is likely no more exist. The sequence is conjectured to be a permutation of the positive integers.
See A354679 for the differences between terms.
LINKS
Scott R. Shannon, Image of the first 200000 terms. The green line is y = n.
EXAMPLE
a(9) = 15 as a(8) = 8, and 15 is the smallest unused number that is coprime to 8 and whose difference from the previous term, 15 - 8 = 7, has not appeared. Note that 11 and 13 are coprime to 8 but their differences from 8, namely 3 and 5, have already appeared as differences between previous pairs of terms.
a(15) = 13 as a(14) = 19, and 13 is the smallest unused number that is coprime to 19 and whose difference from the previous term, 13 - 19 = -6, has not appeared. Note that 12 is coprime to 19 and smaller than 13 but its difference from 19, namely -7, has already appeared as a difference between a(13) and a(12).
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Scott R. Shannon, Jun 05 2022
STATUS
approved