# sum of the last five digits

what will be the sum of $202020202^{4}$ considering last 5 digits.

What is the efficient method to calculate the sum of the last five digits of the expression $202020202^{4}$...

I tried the following approach

$202020202^{4}$ = $2^{4}$ * $101010101^{4}$

So

$2^{4}$ =16

$101010101^{4}$ consider only $10101^{4}$

but don't know how to proceed further.

So help someone to approach further.

Any suggestions will be welcome.

• Last $5$ digits? Just calculate $20202^4$ and sum up the last $5$ digits. – barak manos Jan 13 '17 at 13:26
• Start with $202^4$. It has last $3$ digits $416$. Then $20202^4$, it has last $3$ digits still $416$ and last $5$ digits $06416$. Then read the previous remark - ready. – Dietrich Burde Jan 13 '17 at 13:27

Write 10101 as 10000+101 and then apply binomial theorem, only two terms will contribute to last five digits. Then do the same for 101 as 100+1. Should be pretty easy from there.

• we have $$202020202^4=1665632568430093729096376321606416$$ and you have the last $5$ digits – Dr. Sonnhard Graubner Jan 13 '17 at 13:37
• @Dr.SonnhardGraubner Wonderful, May I know how you estimated that result? how you computed mentally!!!.....I wanna know that trick as well. – jerry Jan 13 '17 at 13:40
• i can multiply by hand – Dr. Sonnhard Graubner Jan 13 '17 at 13:47
• I think two terms contribute to the last five digits: $101^4$ and $4\cdot 101^3\cdot 10000$. – TonyK Jan 13 '17 at 13:49
• Oops. Corrected – Petra Jan 13 '17 at 13:59

As mentioned you only need to worry about $20202^4$ as the larger powers of ten will leave the final five digits unaffected.

Finding the final five digits is asking for the result of $20202^4 \bmod 10^5$. We can break this down as follows, with all equivalences $\bmod 10^5$, looking at the choices available to make distinct (even) powers of ten (see also trinomial coefficients):

\begin{align} 202020202^4 &\equiv 20202^4\\ &\equiv (2\cdot 10^4 + 2\cdot 10^2 + 2\cdot 10^0 )^4\\ &\equiv 10^6k + \binom 41 2^4 10^{4} + \binom 42 2^4 10^{2+2} + \binom 41 2^4 10^{2} + \binom 40 2^4 10^{0}\\ &\equiv 2^4 \left( (6+4)10^4+4\cdot10^2+10^0 \right)\\ &\equiv 1606416\\ &\equiv 6416\\ \end{align}

Note that we treat as unimportant any terms that are multiplied by $10^6$ or higher power of ten as they will not affect the modular result.

So the final five digits are $\fbox{06416}$