OFFSET
1,1
COMMENTS
A generalization of A064413.
LINKS
Peter Kagey, Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, EKG Sequence
MATHEMATICA
f[s_List] := Block[{m = s[[-1]], k = 3}, While[MemberQ[s, k] || GCD[m, k] == 1, k++]; Append[s, k]]; Nest[f, {6, 2}, 71] (* Michael De Vlieger, Jan 21 2016, after Robert G. Wilson v at A064413 *)
PROG
(Python)
from math import gcd
def aupton(terms):
alst, aset = [1, 6], {1, 6}
for n in range(2, terms+1):
k = 2
while True:
while k in aset: k += 1
if gcd(alst[-1], k) != 1: alst.append(k); aset.add(k); break
k += 1
return alst[1:]
print(aupton(73)) # Michael S. Branicky, Jun 02 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
T. D. Noe and N. J. A. Sloane, Jun 02 2010
STATUS
approved