1 0 0 9 1 0 0 8 ( 1 0 0 9 2 − 2 ) !
Find the remainder when the number above is divided by 1009.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
You don't really need to use modular multiplicative inverses here. It suffices to use Wilson's Theorem along with the fact that 1 0 0 9 is a prime (and also noting that the numerator of the fraction has only 1 0 0 8 multiples of 1 0 0 9 ).
( 1 0 0 9 2 − 2 ) ! = ⎝ ⎛ k = 0 ∏ 1 0 0 7 m = 1 0 0 9 k + 1 ∏ 1 0 0 9 ( k + 1 ) − 1 m ⎠ ⎞ ⋅ ⎝ ⎛ k = 1 0 0 9 × 1 0 0 8 + 1 ∏ 1 0 0 9 2 − 2 k ⎠ ⎞ ⋅ ( k = 1 ∏ 1 0 0 8 1 0 0 9 k ) ⟹ 1 0 0 9 1 0 0 8 ( 1 0 0 9 2 − 2 ) ! = ⎝ ⎛ k = 0 ∏ 1 0 0 7 m = 1 0 0 9 k + 1 ∏ 1 0 0 9 ( k + 1 ) − 1 m ⎠ ⎞ ⋅ ⎝ ⎛ k = 1 0 0 9 × 1 0 0 8 + 1 ∏ 1 0 0 9 2 − 2 k ⎠ ⎞ ⋅ ( k = 1 ∏ 1 0 0 8 k )
Applying modulo 1 0 0 9 and a bit of simplifying gives,
1 0 0 9 1 0 0 8 ( 1 0 0 9 2 − 2 ) ! ≡ 1 0 0 8 ! 1 0 0 9 ⋅ 1 0 0 7 ! ≡ ( − 1 ) 1 0 0 9 ⋅ 1 ≡ − 1 ≡ 1 0 0 8 ( m o d 1 0 0 9 )
The last few steps follow from Wilson's Theorem and an extension of it which states that for any prime p , we have ( p − 1 ) ! ≡ − 1 ( m o d p ) and ( p − 2 ) ! ≡ 1 ( m o d p ) .
In fact, the problem can be generalized a bit. We have, for primes p ,
p p − 1 ( p 2 − 2 ) ! ≡ ( − 1 ) p ≡ { 1 − 1 when p = 2 otherwise ( m o d p )
Log in to reply
+1 for generalising
well, the modular multiplicative inverses were easier to understand than... that :P
I am confused with how you simplified the second part so that you could use Wilson's theorem. Could you clarify what you did there? Thanks!
Log in to reply
In 1 0 0 9 2 ! , you have 1010 1 0 0 9 s ( 1 0 0 9 ( 1 ) , 1 0 0 9 ( 2 ) , … , 1 0 0 9 ( 1 0 0 9 ) ) ,so it can be divide by 1 0 0 9 1 0 1 0 . Now, what we left is
[ 1 0 0 9 ( 0 ) + 1 ] × [ 1 0 0 9 ( 0 ) + 2 ] × ⋯ × [ 1 0 0 9 ( 0 ) + 1 0 0 8 ] × 1 ×
[ 1 0 0 9 ( 1 ) + 1 ] × [ 1 0 0 9 ( 1 ) + 2 ] × ⋯ × [ 1 0 0 9 ( 1 ) + 1 0 0 8 ] × 2 ×
[ 1 0 0 9 ( 2 ) + 1 ] × [ 1 0 0 9 ( 2 ) + 2 ] × ⋯ × [ 1 0 0 9 ( 2 ) + 1 0 0 8 ] × 3 ×
⋮
[ 1 0 0 9 ( 1 0 0 8 ) + 1 ] × [ 1 0 0 9 ( 1 0 0 8 ) + 2 ] × ⋯ × [ 1 0 0 9 ( 1 0 0 8 ) + 1 0 0 8 ] × 1 0 0 8
The rightmost number is the result of being divided by 1 0 0 9 . Then, take every number n as n m o d 1 0 0 9 . Finally, you will get something like
1 × 2 × ⋯ × 1 0 0 8 × 1
1 × 2 × ⋯ × 1 0 0 8 × 2
1 × 2 × ⋯ × 1 0 0 8 × 3
⋮
1 × 2 × ⋯ × 1 0 0 8 × 1 0 0 8
There are one 1 0 0 8 ! in each row and one 1 0 0 8 ! from the rightmost vertical column. Hence, there are a total of 1010 1 0 0 8 ! , Hence [ 1 0 0 8 ! ] 2 .
Log in to reply
I think what you mean is like this
[ 1 0 0 9 ( 0 ) + 1 ] × [ 1 0 0 9 ( 0 ) + 2 ] × ⋯ × [ 1 0 0 9 ( 0 ) + 1 0 0 8 ] × 1 × [ 1 0 0 9 ( 1 ) + 1 ] × [ 1 0 0 9 ( 1 ) + 2 ] × ⋯ × [ 1 0 0 9 ( 1 ) + 1 0 0 8 ] × 2 × [ 1 0 0 9 ( 2 ) + 1 ] × [ 1 0 0 9 ( 2 ) + 2 ] × ⋯ × [ 1 0 0 9 ( 2 ) + 1 0 0 8 ] × 3 ×
⋮
[ 1 0 0 9 ( 1 0 0 7 ) + 1 ] × [ 1 0 0 9 ( 1 0 0 7 ) + 2 ] × ⋯ × [ 1 0 0 9 ( 1 0 0 7 ) + 1 0 0 8 ] × 1 0 0 8 × [ 1 0 0 9 ( 1 0 0 8 ) + 1 ] × [ 1 0 0 9 ( 1 0 0 8 ) + 2 ] × ⋯ × [ 1 0 0 9 ( 1 0 0 8 ) + 1 0 0 8 ]
so we can simplify it...
1 × 2 × ⋯ × 1 0 0 8 × 1
1 × 2 × ⋯ × 1 0 0 8 × 2
1 × 2 × ⋯ × 1 0 0 8 × 3
⋮
1 × 2 × ⋯ × 1 0 0 8 × 1 0 0 8
1 × 2 × ⋯ × 1 0 0 8
if you check your calculation from your response above you will get (1008!)^1009, this one will give result (1008!)^1010
Since 1009 is a prime number, there are 1008 factors 1009 in ( 1 0 0 9 2 − 2 ) ! (namely, once for each multiple of 1009). Thus the answer is not zero.
Modulo 1009, we write 1 0 0 9 1 0 0 8 ( 1 0 0 9 2 − 1 ) ! ≡ 1 0 0 8 ! ⋅ 1 ⋅ 1 0 0 8 ! ⋅ 2 ⋅ 1 0 0 8 ! ⋅ 3 ⋯ 1 0 0 8 ! ⋅ 1 0 0 8 ⋅ 1 0 0 8 ! ≡ ( 1 0 0 8 ! ) 1 0 1 0 . The factors in 1 0 0 8 ! may be paired together in pairs of multiplicative inverses, except 1 and 1008, which are multiplicative inverses of themselves. Thus ( 1 0 0 8 ! ) 1 0 1 0 ≡ ( 1 ⋅ 1 0 0 8 ) 1 0 1 0 ≡ ( − 1 ) 1 0 1 0 ≡ 1 .
Divide out a factor 1 0 0 9 2 − 1 : 1 0 0 9 1 0 0 8 ( 1 0 0 9 2 − 1 ) ! ≡ 1 0 0 8 1 ≡ − 1 1 ≡ − 1 ≡ 1 0 0 8 modulo 1009. Thus the answer is 1 0 0 8 .
Problem Loading...
Note Loading...
Set Loading...
1 0 0 9 1 0 0 8 ( 1 0 0 9 2 − 2 ) ! = 1 0 0 9 1 0 0 8 × 1 0 0 9 2 × ( 1 0 0 9 2 − 1 ) ( 1 0 0 9 2 ) ! = 1 0 0 9 1 0 1 0 × ( 1 0 0 9 2 − 1 ) ( 1 0 0 9 2 ) ! = 1 0 0 9 1 0 1 0 ( 1 0 0 9 2 ) ! × 1 0 0 9 2 − 1 1
Wilson's Theorem :
A natural number p is a prime if and only if ( p − 1 ) ! ≡ − 1 m o d p .
1 0 0 9 1 0 1 0 ( 1 0 0 9 2 ) ! ≡ [ ( 1 0 0 8 ) ! ] 1 0 1 0 ≡ ( − 1 ) 1 0 1 0 ≡ 1 m o d 1 0 0 9 m o d 1 0 0 9 m o d 1 0 0 9
1 0 0 9 2 − 1 1 m o d 1 0 0 9
We need to find the Multiplicative Inverse of 1 0 0 9 2 − 1 .
Let the multiplicative inverse be x , such that
( 1 0 0 9 2 − 1 ) x 1 0 0 9 2 x − x x ≡ 1 ≡ 1 ≡ − 1 m o d 1 0 0 9 m o d 1 0 0 9 m o d 1 0 0 9
1 0 0 9 1 0 1 0 ( 1 0 0 9 2 ) ! × 1 0 0 9 2 − 1 1 ≡ ( 1 ) × ( − 1 ) ≡ 1 0 0 8 m o d 1 0 0 9 m o d 1 0 0 9