MODBasic Intermediate

Problem - 4216

Compute $9^{50}\pmod{1000}$.


This problem can be solved with the binomial expansion. $$9^{50} = (10-1)^{50}=\cdots - C_{50}^3\times 10^3  + C_{50}^2\times 10^2 - C_{50}^1\times 10 + C_{50}^0$$

It is clear that all terms except the last three are multiple of $1000$. Therefore their sum must be congruent to $0$ modulo $1000$. Therefore $$9^{50}\equiv C_{50}^2 \times 10^2 - C_{50}^1 + C_{50}^0 \equiv \frac{50\times 49}{2}\times 100 - 500 + 1\equiv \boxed{1}\pmod{1000}$$

report an error