cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A350445 a(n) is the smallest number larger than a(n-1) that has only one digit in common with a(n-1).

This page as a plain text file.
%I A350445 #25 Jan 07 2022 15:50:25
%S A350445 1,10,12,13,14,15,16,17,18,19,21,23,24,25,26,27,28,29,32,34,35,36,37,
%T A350445 38,39,43,45,46,47,48,49,54,56,57,58,59,65,67,68,69,76,78,79,87,89,90,
%U A350445 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
%N A350445 a(n) is the smallest number larger than a(n-1) that has only one digit in common with a(n-1).
%C A350445 Terms computed by _Claudio Meller_.
%e A350445 a(11) = 21 because it is the smallest number larger than a(10) = 19 that has exactly one digit in common.
%e A350445 Similarly, a(55) = 108 because it is the smallest number larger than a(54) = 98 that has exactly one digit in common.
%t A350445 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 *)
%o A350445 (Python)
%o A350445 from itertools import islice
%o A350445 def c(s, t): return sum(t.count(si) for si in s)
%o A350445 def agen(): # generator of terms
%o A350445     an, target = 1, "1"
%o A350445     while True:
%o A350445         yield an
%o A350445         k = an + 1
%o A350445         while c(str(k), target) != 1: k += 1
%o A350445         an, target = k, str(k)
%o A350445 print(list(islice(agen(), 75))) # _Michael S. Branicky_, Dec 31 2021
%Y A350445 Cf. A350444.
%K A350445 nonn,base
%O A350445 1,2
%A A350445 _Rodolfo Kurchan_, Dec 31 2021