OFFSET
1,2
COMMENTS
Terms computed by Claudio Meller.
See A350671 for the definition of number of digits in common between x and y. In particular, if x has r digits in common with y, then y also has r digits in common with x. - Jianing Song, May 07 2022
EXAMPLE
a(11) = 44 because it is the smallest number larger than a(10) = 43 that has exactly two digits in common.
Similarly, a(27) = 109 because it is the smallest number larger than a(26) = 99 that has exactly two digits in common (the digit 9 of 109 it is in common with the first and second 9 of 99).
MATHEMATICA
a[1]=1; a[n_]:=a[n]=(k=a[n-1]+1; While[Total[Count[IntegerDigits@a[n-1], #]&/@IntegerDigits@k]!=2, k++]; k); Array[a, 60] (* Giorgos Kalogeropoulos, Jan 12 2022 *)
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) != 2: k += 1
an, target = k, str(k)
print(list(islice(agen(), 76))) # Michael S. Branicky, Jan 10 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rodolfo Kurchan, Jan 10 2022
STATUS
approved