Prove that the difference between numbers with the same sum of digits is a multiple of $9$.
2026-04-02 09:38:36.1775122716
Prove that the difference between numbers with the same sum of digits is a multiple of $9$.
232 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
Ideally, you're supposed to show what you've tried, etc. on this website. However, since you're a new user, I do not want to be too harsh with regard to downvoting and closing, etc. I have answered (and corrected) your question below, but do bear in mind that you must show some effort while posting questions on MathSE in the future. Thank you, and welcome to the community!
Well, the difference is not exactly $9$, but it is a multiple of $9$. Consider two $n$-digit numbers $A = a_1a_2\ldots a_n$ and $B = b_1b_2\ldots b_n$ such that $$\sum_{i=1}^n a_i = \sum_{i=1}^n b_i \implies \sum_{i=1}^n (a_i-b_i) = 0$$ You are free to assume the first few digits of the number (or any other for that matter) to be zero, in order to produce numbers that have less than $n$ digits. The proof still goes through.
$$A - B = 10^{n-1}(a_1-b_1) + 10^{n-2}(a_2-b_2) + \ldots + (a_n-b_n)$$ Using $\sum_{i=1}^n (a_i-b_i) = 0$, we can simplify the above expression to get: $$A - B = (10^{n-1}- 1)(a_1-b_1) + (10^{n-2}- 1)(a_2-b_2) + (10^{1}- 1)(a_{n-1}-b_{n-1})$$ Now, $10^k - 1$ is always a multiple of $9$. In addition, each of the terms in the expression of $A-B$ above, is a multiple of $10^k -1$ for some $k \ge 1, k\in\mathbb Z$. As a result, each term of the sum is a multiple of $9$, and therefore $A-B$ itself is also a multiple of $9$.
Why is $10^k-1$ a multiple of $9$ - you may ask? The binomial expansion suffices! $$10^k - 1 = (9+1)^k - 1 = \text{sum of multiples of }9 = \text{multiple of }9$$ I leave the details of the above argument to you. Lastly, this works for all $n\in\mathbb N$, and so we have proved it for all numbers.
Summary: The difference between two integers with the same sum of digits, is divisible by $9$.