4
$\begingroup$

What are the last four digits of the following sum:

$S=9+9^2+9^3+\ldots+9^{400} ?$

  • 4
    No attempt at the answer??2012-12-03

2 Answers 2

7

Hint: This is a geometric sum, you can sum it and then do mod $10000$ to get the last $4$ digits

  • 0
    @akkkk - thanks, updated2012-12-03
3

HINT 2: Use Euler's Theorem: if $a$ and $m$ are coprime, we have $a^n\equiv a^{n \text{ mod }\varphi(m)} \text{ mod }m$, where $\varphi$ is Euler's totient function. What is $\varphi(10000)$?