MathDB
Sum of digits problem

Source: 44th International Tournament of Towns, Junior A-Level P6, Fall 2022

February 16, 2023
number theorysum of digitsTournament of Towns

Problem Statement

Peter added a positive integer MM{} to a positive integer NN{} and noticed that the sum of the digits of the resulting integer is the same as the sum of the digits of NN{}. Then he added MM{} to the result again, and so on. Will Peter eventually get a number with the same digit sum as the number NN{} again?