# last N digits

##### Well-known member
Prove that the last 6 digits of 7^10000 is 000001

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Prove that the last 6 digits of 7^10000 is 000001
$\begin{array}{} 7^4 &=& 2401 &\equiv& 1 \pmod{400} \\ 7^{100} &=& (7^4)^{25} &=& (400k+1)^{25} &=& ...\ +\ 25 \cdot 400k + 1 &\equiv& 1 \pmod{10000} \\ 7^{10000} &=& (7^{100})^{100} &=& (10000m + 1)^{100} &=& ...\ +\ 100\cdot 10000m + 1 &\equiv& 1 \pmod{1000000} \\ \blacksquare \end{array}$

##### Well-known member
$\begin{array}{} 7^4 &=& 2401 &\equiv& 1 \pmod{400} \\ 7^{100} &=& (7^4)^{25} &=& (400k+1)^{25} &=& ...\ +\ 25 \cdot 400k + 1 &\equiv& 1 \pmod{10000} \\ 7^{10000} &=& (7^{100})^{100} &=& (10000m + 1)^{100} &=& ...\ +\ 100\cdot 10000m + 1 &\equiv& 1 \pmod{1000000} \\ \blacksquare \end{array}$
neater than my solution. I shall post mine one week later so that others can post

##### Well-known member
here is my solution

we know 7^4 = 2401

so 7^10000 = (2401)^2500

now 2401^2500 = (2400+1)^2500

if we collect nth term it it (2500 C n) (2400)^n

for n > 2 2400^n is divisible by 10^6

so we need to look for n = 2 and n =1

n=0 gives 1 and 1-1 = 0

n = 2 => (2500C2)(2400)^2 = 2500*1200*2400 so 10^6 is a factor
n =1 =>(2500)(2400) = 6000000 so 10^6 is a factor

so all the elements except last that is 1 is divisible by 10^6 and last element is 1

so last 6 digits are 000001 or 7^10000 mod 10^6 = 1

Last edited:

#### MarkFL

Staff member
Hello Kali,

Please do not give a link to another site as a means of providing a solution, either by the author of the topic posted here, or by someone responding with a solution.
For the convenience of our members, we prefer that they not have to follow links, but that the solution(s) be posted here. This makes it easier on the majority. For the convenience of our members, we prefer that they not have to follow links, but that the solution(s) be posted here. This makes it easier on the majority. 