OFFSET
1,2
COMMENTS
Conjectured to be a permutation of the positive integers.
EXAMPLE
We start with a(1) = 1. To find a(2), we need the earliest positive integer such that a(1) + a(2) is coprime to 3. So, a(2) = 3. To find a(3), we can use neither 2 nor 4, because 6 and 8 have a common factor with 4, so we use a(3) = 5.
PROG
(PARI) A333111_vec(N, a=Vec(1, N), s=1, u=1)={ for(n=2, N, u+=1<<a[n-1]; for(k=valuation(u+1, 2), oo, bittest(u, k) || gcd(s+k, n+1)>1 || [s+=a[n]=k, break])); a}
CROSSREFS
KEYWORD
nonn
AUTHOR
Ali Sada and M. F. Hasler, Mar 07 2020
STATUS
approved