MathDB
smallest a so that S(n)-S(n+a) = 2018, where S(n)=sum of digits

Source: Lusophon 2018 CPLP P3

September 13, 2018
number theorysum of digitsminimum

Problem Statement

For each positive integer nn, let S(n)S(n) be the sum of the digits of nn. Determines the smallest positive integer aa such that there are infinite positive integers nn for which you have S(n)āˆ’S(n+a)=2018S (n) -S (n + a) = 2018.