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.

A350444 a(n) is the smallest number that has not appeared yet in the sequence and has only one digit in common with a(n-1).

This page as a plain text file.
%I A350444 #37 Jan 07 2022 15:49:58
%S A350444 1,10,12,2,20,21,13,3,23,24,4,14,15,5,25,26,6,16,17,7,27,28,8,18,19,9,
%T A350444 29,32,30,31,34,35,36,37,38,39,43,40,41,42,45,46,47,48,49,54,50,51,52,
%U A350444 53,56,57,58,59,65,60,61,62,63,64,67,68,69,76,70,71,72,73,74,75,78,79,87,80,81,82,83,84,85,86,89,90
%N A350444 a(n) is the smallest number that has not appeared yet in the sequence and has only one digit in common with a(n-1).
%C A350444 Terms computed by _Claudio Meller_.
%C A350444 It appears that this sequence contains all numbers except those in A115853.
%H A350444 Michael De Vlieger, <a href="/A350444/a350444.png">Log-log scatterplot of a(n)</a> for n = 1..10000 labeling the first 40 terms.
%e A350444 a(2) = 10 because it is the smallest number that has exactly one digit in common with a(1) = 1; similarly, a(3) = 12 because it has one digit in common with a(2) = 10 and a(4) = 2 because it is the smallest number that is not already in the sequence that has exactly one digit in common with a(3) = 12.
%t A350444 c[_] = False; j = c[1] = 1; {j}~Join~Reap[Do[d = Union@ IntegerDigits[j]; If[j == u, While[c[u] > 0, u++]]; k = u; While[Nand[c[k] == False, Count[IntegerDigits[k], _?(MemberQ[d, #] &)] == 1], k++]; Sow[k]; c[k] = True; j = k, 81]][[-1, -1]] (* _Michael De Vlieger_, Dec 31 2021 *)
%o A350444 (Python)
%o A350444 from itertools import islice
%o A350444 def c(s, t): return sum(t.count(si) for si in s)
%o A350444 def agen(): # generator of terms
%o A350444     an, target, seen, mink = 1, "1", {1}, 2
%o A350444     while True:
%o A350444         yield an
%o A350444         k = mink
%o A350444         while k in seen or c(str(k), target) != 1: k += 1
%o A350444         an, target = k, str(k)
%o A350444         seen.add(an)
%o A350444         while mink in seen: mink += 1
%o A350444 print(list(islice(agen(), 82))) # _Michael S. Branicky_, Dec 31 2021
%Y A350444 Cf. A115853, A350445.
%K A350444 nonn,base
%O A350444 1,2
%A A350444 _Rodolfo Kurchan_, Dec 31 2021