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