Consider N=2004^2004.

1) What are the first 3 digits of N?

2) What are the last 3 digits of N?

(In reply to

Solution To Part I by K Sengupta)

It can easily be shown in terms of analytical methods that:

376^m (mod 1000)

= 376, for any positive integer m............(i)

Now, we know that:

4^10 (Mod 1000) = 576, while:

576^5 (Mod 1000) = 376

Or, 4^50 (Mod 1000) = 376, for any positive integer m (from (i))

........... (ii)

Now, 2004(Mod 1000) = 4

or, 2004^p (Mod 1000) = 4^p (mod 1000), for any non negative integer p.

Thus, substituting m = 40 in (ii), we obtain:

2004^2000 (Mod 1000)

= 4^2000 (Mod 1000)

= 376

But,

4^2002(Mod 1000) = 376*16 (Mod 1000)

= 16

Accordingly,

2004^2004 (Mod 1000)

= 16*16 (Mod 1000)

= 256

Consequently, the last three digits of N are 256

*Edited on ***October 18, 2007, 6:29 am**