OFFSET
1,2
COMMENTS
After 100000 terms the lowest unused number is 99986. It is almost certain that this sequence is a permutation of the positive integers.
LINKS
Scott R. Shannon, Image of the first 1000 terms. The green line is a(n) = n.
MATHEMATICA
Block[{a = {1}, m = {1}, k}, Do[k = 2; While[Nand[FreeQ[a, k], GCD[k, a[[-1]]] == 1, IntersectingQ[m, IntegerDigits[k]]], k++]; AppendTo[a, k]; Set[m, IntegerDigits[k]], {i, 74}]; a] (* Michael De Vlieger, Mar 11 2021 *)
PROG
(Python)
from sympy import factorint
def aupton(terms):
alst, aset = [1], {1}
for n in range(2, terms+1):
an = 1
anm1_digs, anm1_factors = set(str(alst[-1])), set(factorint(alst[-1]))
while True:
while an in aset: an += 1
if set(str(an)) & anm1_digs != set():
if set(factorint(an)) & anm1_factors == set():
alst.append(an); aset.add(an); break
an += 1
return alst
print(aupton(74)) # Michael S. Branicky, Mar 09 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Scott R. Shannon, Mar 09 2021
STATUS
approved