OFFSET
1,2
COMMENTS
Equivalently: lexicographically earliest sequence of distinct positive integers such that a(1) = 1, and for any m, n > 1, if abs(a(n) - a(m)) = 1, then gcd(m, n) > 1.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
Rémy Sigrist, PARI program
EXAMPLE
A355212(39) = 42 so a(42) = 39.
PROG
(PARI) See Links section.
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Jun 24 2022
STATUS
approved