A381167 Each term is the least positive integer not appearing earlier such that gcd(a(m),a(n)) = 1 or |m-n| > max(a(m),a(n)) for all m <> n.
1, 2, 3, 5, 7, 11, 4, 13, 17, 19, 23, 29, 9, 31, 37, 8, 41, 43, 47, 53, 59, 61, 67, 71, 6, 73, 79, 83, 89, 25, 97, 101, 103, 107, 109, 113, 127, 12, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 14, 199, 211, 15, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277
Offset: 1
Keywords
Examples
The number a(25) = 6 shares a factor with a(16) = 8, and therefore must be at "distance" > 8 (i.e., separated by 8 relatively prime terms) from a(16). This is the first example where the smaller of two terms sharing a common factor occurs after the larger one.
Links
- Daniel Mondot, Table of n, a(n) for n = 1..10000 (first 68 entries from M. F. Hasler).
Crossrefs
Cf. A381019.
Programs
-
PARI
S=U=[1]; A381167(n)=while(#S
max(k,S[m]) || return) next_term()={S[#S]>U[1]&& U=setunion(U,[S[#S]]); while(#U>1&&U[2]==U[1]+1, U=U[^1]); for(k=U[1]+1,oo, !setsearch(U, k) && ok(k) && return(k))}
Comments