OFFSET
1,2
COMMENTS
As the sequence always takes the earliest number satisfying the restriction gcd(a(n),a(n+k)) = 1, all the terms beyond a(1) will be prime.
EXAMPLE
a(3) = 3, as a(1) = 1, a(2) = 2, so the next one term after a(2) cannot share a divisor with 2, and the smallest such number is 3.
a(4) = 2 and a(5) = 5, as a(2) = 2, a(3) = 3, so the next two terms after a(3) cannot share a divisor with 3. The first such term is 2. But now a(3) = 3 and a(4) = 2, so the next three terms after a(4) cannot share a divisor with 2. The smallest number which satisfies both of these restrictions is 5.
CROSSREFS
KEYWORD
nonn
AUTHOR
Scott R. Shannon, Sep 09 2021
STATUS
approved