Question 394982
Let {{{f(x) = sum(a[i]*x^i, i = 0, n)}}} be a polynomial and {{{f(10) = sum(a[i]*10^i, i = 0, n)}}} be a base-10 number that is divisible by 9. It follows that {{{f(1)}}} is the sum of the digits, or {{{sum(a[i], i = 0, n)}}}. Then,


{{{f(10) - f(1) = sum((a[i]*10^i), i = 0, n) - sum(a[i], i = 0, n) = sum((a[i]*(10^i - 1)), i = 0, n)}}} = 0 (modulo 9) since all powers of 10 are congruent to 1 modulo 9. Hence, {{{f(10)}}} and {{{f(1)}}} have the same residue modulo 9, and we are done.


To generalize to any base, simply replace 10 with base b+1. The same result should follow, since b+1 is always 1 modulo b.