MathDB
Removing digits 1 and adding N to the number on the blackboard

Source: 2022 3rd OMpD L2 P3 - Brazil - Olimpíada Matemáticos por Diversão

July 8, 2023
combinatoricsDigits

Problem Statement

Let NN be a positive integer. Initially, a positive integer AA is written on the board. At each step, we can perform one of the following two operations with the number written on the board:
(i) Add NN to the number written on the board and replace that number with the sum obtained;
(ii) If the number on the board is greater than 11 and has at least one digit 11, then we can remove the digit 11 from that number, and replace the number initially written with this one (with removal of possible leading zeros)
For example, if N=63N = 63 and A=25A = 25, we can do the following sequence of operations: 258815151525 \rightarrow 88 \rightarrow 151 \rightarrow 51 \rightarrow 5 And if N=143N = 143 and A=2A = 2, we can do the following sequence of operations: 2145288431574717860100332 \rightarrow 145 \rightarrow 288 \rightarrow 431 \rightarrow 574 \rightarrow 717 \rightarrow 860 \rightarrow 1003 \rightarrow 3
For what values of NN is it always possible, regardless of the initial value of AA on the blackboard, to obtain the number 11 on the blackboard, through a finite number of operations?