Re: Mod 2011




León-Sotelo wrote:
Determine the remainder when 1004! is divided by 2011.

Thanks
León-Sotelo

Here is one way to proceed. We have, via Wilson's Theorem:

1 * 2 * 3 * .... * 2010 = -1 mod 2011

Now pair off the product as follows:

(1* 2010) * (2 * 2009) * ..... (1004 * 1007) * 1005 * 1006 = -1 mod
2011

Whence

(1* -1) * (2* -2) * (3* -3) ..... (1004 * -1004) *1005 * 1006 = -1
mod 2011

Or

(1004!)^2 = -1/(1005 * 1006) mod 2011

Note that 1005 * 1006 = (p-1)/2 * -(p-1)/2 so the inverse is just
-4/(p-1)^2.

The rest should be easy......

.


Loading