Exercise 618Number theory › CongruencesM1Added 4 Nov 2026
n + S(n) + S(S(n)) = 60
#digit sum#congruence modulo 9#bounding
Statement
Let denote the sum of the decimal digits of . Find all positive integers such that
Hint
Use to restrict modulo , then bound from below.
Show solutionHide solution
Solution
Idea. A congruence cuts the candidates by a factor of ; a size estimate makes the list finite and short.
Congruence. and , so the left side is . Since , , i.e. .
Bounds. Clearly , so or : at most . Then (the maximum of over is ). Hence .
Candidates. with : .
- :
- :
- : ✓
- : ✓
- : ✓
- :
- :
- :
Answer. .
Lesson. For digit-sum equations, combine the congruence with a crude bound on , then check the remaining few cases.