Big Numbers Make Me Cry

What is the remainder when 2028 ! 2028! is divided by 2029 2029 ?

Details and assumptions

The factorial of a positive integer n n , denoted by n ! n! , is the product of all positive inegers less than or equal to n n . For example, 5 ! = 5 × 4 × 3 × 2 × 1 = 120 5! = 5 \times 4 \times 3 \times 2 \times 1 = 120 .


The answer is 2028.

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.

2 solutions

This is a direct application of Wilson's Theorem .

Since 2029 2029 is prime, we have that

2028 ! 1 m o d 2029 2028 m o d 2029 2028! \equiv -1 \mod{2029} \equiv 2028\mod{2029} .

Thus the remainder is 2028 \boxed{2028} .

This is true for any case where x ! x! is divided by x + 1 x+1 , where x + 1 x+1 is prime. The remainder will be x x .

Joshua Ong - 6 years, 7 months ago

is -1 also a correct answer.

shivamani patil - 6 years, 7 months ago

Log in to reply

Good point. Technically, yes it is, but in this type of question it is normally assumed that the desired answer is positive. Perhaps the phrasing of the question should have been more specific. At least you still got credit for answering the question; thankfully we get 3 guesses at these problems, unlike in an exam. :)

Brian Charlesworth - 6 years, 7 months ago

-1 is also correct

Monarch Adlakha - 6 years, 7 months ago
Victor Loh
Oct 23, 2014

Note that 2029 2029 is prime. By Wilson's Theorem,

2028 ! 1 ( m o d 2029 ) 2028 ( m o d 2029 ) . 2028! \equiv -1 \pmod{2029} \equiv \boxed{2028} \pmod{2029}._\square

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...