Skip to main content
OlympiadHQ

Browse · MathNet

Print

Dutch Mathematical Olympiad

Netherlands algebra

Problem

Felix chooses a positive integer as the starting number and writes it on the board. He then repeats the next step: he replaces the number on the board by if is even and by if is odd. For how many choices of starting numbers below 2023 will Felix never write a number of more than four digits on the board?
Solution
We first show that if Felix starts with an odd number, the next two numbers he writes down will be even. Suppose Felix starts with an odd number . Then the next number he writes down is . We must show that is even, and is even as well. In other words, must be divisible by 4. Since is odd, we can write for a non-negative integer . Then it holds that and this is indeed divisible by 4.

Suppose Felix starts with an odd number. Then the next number he writes down is divisible by 4, as we saw above. So the next two numbers Felix gets by dividing by 2 each time. The result, , is an odd number, independent of being even or odd, as one of the two factors of is even. Then the same three steps follow again: squaring plus 3, dividing by 2, and dividing by 2 again, and these three steps keep repeating. We are going to show that for odd , the odd number after three steps is greater than . In that case, the process is going to produce larger and larger numbers and eventually Felix will write down a number of more than four digits. The inequality we want to check is , or, equivalently, , or, equivalently, . This is indeed true for . Only for the odd starting numbers 1 and 3 do the numbers remain small: this gives the repetitions and .

the numbers after that keep getting bigger. Only if repetitive dividing by 2 ends up with 1 or 3, the numbers after that always remain less than four digits. Those are numbers of the form or . Of the first form, 11 are smaller than 2023 ( to ) and of the second form, 10 are smaller than 2023 ( to ). So in total there are 21 starting numbers where Felix will never write a number of more than four digits on the board.
Final answer
21

Techniques

Recurrence relationsInvariants / monovariantsLinear and quadratic inequalitiesOther