The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

A258078

a(0)=1, a(1)=2; for n>=2, a(n)=smallest number not already used which is relatively prime to a(n-1) if T(n-1)=T(n), and otherwise shares a factor with a(n-1), where {T(n)} is the Thue-Morse sequence (A010060).