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.

A343444 Smallest nonnegative integer such that altering at most one of its digits cannot result in a previous term.

Original entry on oeis.org

0, 11, 22, 33, 44, 55, 66, 77, 88, 99, 101, 110, 123, 132, 145, 154, 167, 176, 189, 198, 202, 213, 220, 231, 246, 257, 264, 275, 303, 312, 321, 330, 347, 356, 365, 374, 404, 415, 426, 437, 440, 451, 462, 473, 505, 514, 527, 536, 541, 550, 563, 572, 606, 617, 624, 635, 642, 653, 660, 671, 707, 716, 725, 734, 743, 752
Offset: 1

Views

Author

Bert Dobbelaere, Apr 15 2021

Keywords

Comments

Allowing prepending the integer representation with zeros; this means the Hamming distance between two digit strings representing different terms is at least 2.
Numbers whose bitwise XOR of digits is equal to zero. - Jeremias M. Gomes, Jul 25 2021

Crossrefs

Programs

  • Python
    def ham(m, n):
      s, t = str(min(m, n)), str(max(m, n))
      s = '0'*(len(t)-len(s)) + s
      return sum(s[i] != t[i] for i in range(len(t)))
    def aupton(terms):
      alst = [0]
      for n in range(2, terms+1):
        an = alst[-1] + 1
        while any(ham(an, alst[-i]) < 2 for i in range(1, len(alst)+1)): an += 1
        alst.append(an)
      return alst
    print(aupton(66)) # Michael S. Branicky, Apr 15 2021