OFFSET
1,2
COMMENTS
Terms computed by Claudio Meller.
EXAMPLE
a(11) = 21 because it is the smallest number larger than a(10) = 19 that has exactly one digit in common.
Similarly, a(55) = 108 because it is the smallest number larger than a(54) = 98 that has exactly one digit in common.
MATHEMATICA
j = 1; {j}~Join~Reap[Do[d = Union@ IntegerDigits[j]; k = j + 1; While[Count[IntegerDigits[k], _?(MemberQ[d, #] &)] != 1, k++]; Sow[k]; j = k, 82]][[-1, -1]] (* Michael De Vlieger, Dec 31 2021 *)
PROG
(Python)
from itertools import islice
def c(s, t): return sum(t.count(si) for si in s)
def agen(): # generator of terms
an, target = 1, "1"
while True:
yield an
k = an + 1
while c(str(k), target) != 1: k += 1
an, target = k, str(k)
print(list(islice(agen(), 75))) # Michael S. Branicky, Dec 31 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rodolfo Kurchan, Dec 31 2021
STATUS
approved