login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A350445 a(n) is the smallest number larger than a(n-1) that has only one digit in common with a(n-1). 5
1, 10, 12, 13, 14, 15, 16, 17, 18, 19, 21, 23, 24, 25, 26, 27, 28, 29, 32, 34, 35, 36, 37, 38, 39, 43, 45, 46, 47, 48, 49, 54, 56, 57, 58, 59, 65, 67, 68, 69, 76, 78, 79, 87, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 108, 122, 130, 142, 150, 162, 170, 182, 190, 202, 301, 322, 340, 351, 360, 371, 380, 391, 401, 422, 430 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Terms computed by Claudio Meller.
LINKS
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
Cf. A350444.
Sequence in context: A261907 A102357 A102850 * A043493 A105959 A059504
KEYWORD
nonn,base
AUTHOR
Rodolfo Kurchan, Dec 31 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 7 22:54 EDT 2024. Contains 375018 sequences. (Running on oeis4.)