login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A343444
Smallest nonnegative integer such that altering at most one of its digits cannot result in a previous term.
5
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,2
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
LINKS
J. H. Conway and N. J. A. Sloane, Lexicographic codes: error-correcting codes from game theory, IEEE Transactions on Information Theory, 32:337-348, 1986.
Wikipedia, Hamming distance
PROG
(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
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Bert Dobbelaere, Apr 15 2021
STATUS
approved