MathLabs

Problem 4

When 444444444444^{4444} is written in decimal notation, the sum of its digits is AA. Let BB be the sum of the digits of AA. Find the sum of the digits of BB. (AA and BB are written in decimal notation.)
Step 4 of 6: Digit sums preserve residues modulo 9
N≡S(N)(mod9)  ⟹  44444444≡A≡B≡S(B)(mod9)N \equiv S(N) \pmod 9 \implies 4444^{4444} \equiv A \equiv B \equiv S(B) \pmod 9
Detailed analysis

Every power of 1010 is ≡1(mod9)\equiv 1 \pmod 9, so a number and its digit sum are always congruent modulo 99: writing N=∑kak10kN = \sum_k a_k 10^k, we get N≡∑kak=S(N)(mod9)N \equiv \sum_k a_k = S(N) \pmod 9. Applying this three times, 44444444≡A≡B≡S(B)(mod9)4444^{4444} \equiv A \equiv B \equiv S(B) \pmod 9.