TOT 1999 Autumn AS3 number in sequence repeated >=100 times
Source:
May 11, 2020
combinatoricsSequenceDigits
Problem Statement
Tireless Thomas and Jeremy construct a sequence. At the beginning there is one positive integer in the sequence. Then they successively write new numbers in the sequence in the following way: Thomas obtains the next number by adding to the previous number one of its (decimal) digits, while Jeremy obtains the next number by subtracting from the previous number one of its digits. Prove that there is a number in this sequence which will be repeated at least times. (A Shapovalov)