MathDB
n+s(n)=2004, sum of digits=s(n) (2001 Moldova MO Grade 7 P2)

Source:

April 12, 2021
number theory

Problem Statement

Let S(n)S(n) denote the sum of digits of a natural number nn. Find all nn for which n+S(n)=2004n+S(n)=2004.