Maths Olympiad Prep

Library / /7 of 11

, 2022

Algebra Difficulty 7.6 National olympiad, round 2 Prove it Hong Kong

A special calculator contains a red button, which counts the number of even digits of an integer. For instance, when the screen shows 20222022, pressing the red button gives 44 since all 44 digits of 20222022 are even. Someone inputs a positive integer nn into the calculator and keeps pressing the red button until 00 is displayed on the screen. If 00 is displayed after the red button has been pressed four times, find the smallest possible value of nn.

Solution

Answer: 2×10192 \times 10^{19}
Suppose the sequence of numbers shown on the calculator screen is
npqr0 n \to p \to q \to r \to 0
with pp, qq, rr nonzero. Note that rr is at least 11 and so qq consists of at least one even digit, which means q2q \geq 2. Hence pp consists of at least two even digits and is no less than 2020. It follows that nn has at least 2020 even digits, and the smallest such number is 2×10192 \times 10^{19}, which one easily verifies to be a possible value of nn. (The sequence in this case will be 20002021020\ldots00 \to 20 \to 2 \to 1 \to 0.)

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement and solution reproduced as published; topic and difficulty added by this site.