MathDB
ALPHABETA numbering system uses only digits 0 and 1

Source: Portugal OPM 1996 p1

May 18, 2024
number theory

Problem Statement

Have you ever found it strange that “almost the same” numbers can look very different? For example, in the decimal system 2929 and 3030 only differ by one unit but do not contain any common digits. The ALPHABETA numbering system uses only the digits0 0 and 11 and avoids this situation:
https://cdn.artofproblemsolving.com/attachments/d/f/dcdf284b3baeea8775de56ece091c80d3449a8.png
In it, the rule for constructing the successor of a number is as follows: without repeating a previous number in the list, change the digit as far to the right as possible, otherwise a 1 is placed to the left. (a) What number in the decimal system is represented in the ALPHABETA code by the number 111111111111?
(b) What is the next number in this code?
(c) Describe an algorithm to find, given any number in the ALPHABETA code, the next number in this code.