Future Factorials

Find the remainder when 2016 ! 2015 ! 2016!-2015! is divided by 2017 2017 .

You may use the fact that 2017 2017 is prime.


The answer is 2015.

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.

7 solutions

Pi Han Goh
May 10, 2014

We generalize it to find the remainder for ( p 1 ) ! ( p 2 ) ! (p-1)! - (p-2)! when it's divided by prime p p

By Wilson's Theorem, ( p 1 ) ! ( m o d p ) 1 (p-1)! \pmod p \equiv -1

( p 1 ) ( p 2 ) ! ( m o d p ) 1 \Rightarrow (p-1) (p-2)! \pmod p \equiv -1

( p 2 ) ! ( m o d p ) ( 1 p 1 ) 1 \Rightarrow (p-2)! \pmod p \equiv - \left ( \frac {1}{p-1} \right ) \equiv 1 , because 1 ( p ) 1 ( p 1 ) = 1 1(p) - 1(p-1) = 1

Thus, ( p 1 ) ! ( p 2 ) ! ( m o d p ) 2 p 2 (p-1)! - (p-2)! \pmod p \equiv -2 \equiv p-2 .

In this case, p = 2017 p 2 = 2015 p = 2017 \Rightarrow p - 2 = \boxed{2015}

Daniel Liu, please create another answer possibility if it is possible to do so on brilliant: -2. I lost the first try of solution just because -2 is marked as wrong.

mathh mathh - 7 years, 1 month ago

Log in to reply

Remainders must be in the range [0, 2016] in this problem because that is the definition of a remainder.

Colin Tang - 7 years, 1 month ago

I agree with @Colin Tang and @Vinayak Shukla . Remember that remainders cannot be negative, no matter what. Even i they could, I still could not create two possible correct answers, so sorry.

Daniel Liu - 7 years, 1 month ago

You should have tried 2015, we can't put negative remainders, I guess.

Vinayak Shukla - 7 years, 1 month ago

Me too....

Renato Borseti - 6 years, 7 months ago

I think ( p 2 ) ! 1 ( mod p ) (p-2)! \equiv 1 (\text{mod } p) not 1 -1 .

Sadie Robinson - 7 years, 1 month ago

Log in to reply

Whoops, fixed!

Pi Han Goh - 7 years, 1 month ago

Alternative, just figure out what ( p 2 ) ! (p-2)! is ( m o d p ) \pmod{p} which is easily 1 1 since you can pair up the numbers into p 1 2 \frac{p-1}{2} pairs in the product to get 1 ( m o d p ) 1 \pmod{p} . From there, you can consequently get ( p 1 ) ! p 1 ( m o d p ) (p-1)! \equiv p-1 \pmod{p}

Jared Low - 7 years, 1 month ago
Jubayer Nirjhor
May 23, 2014

First note that for a prime p p , Wilson's theorem states that: ( p 1 ) ! p 1 1 ( m o d p ) (p-1)!\equiv p-1\equiv -1\pmod p . As a direct consequence (by dividing by p 1 p-1 ), we can see that ( p 2 ) ! 1 ( m o d p ) (p-2)!\equiv 1\pmod p . As 2017 2017 is a prime, we have: 2016 ! 2015 ! = ( 2017 1 ) ! ( 2017 2 ) ! 1 1 = 2 2015 ( m o d 2017 ) 2016!-2015!=(2017-1)!-(2017-2)!\equiv -1-1=-2\equiv \fbox{2015}\pmod{2017}

good solution

Vibhor Chandak - 2 years ago
Surya Prakash
Jul 23, 2015

Since 2016 1 m o d 2017 2016 \equiv -1 \mod 2017 . So, 2016 ( 1 ) 1 m o d 2017 2016(-1) \equiv 1 \mod 2017 . It implies that 1 -1 is the inverse of 2016 modulo 2017. So, 2015 ! 2016 ! × 201 6 1 2016 ! × ( 1 ) 2016 ! 1 m o d 2017 2015! \equiv 2016! \times 2016^{-1} \equiv 2016! \times (-1) \equiv -2016! \equiv 1 \mod 2017 . So, 2016 ! 2015 ! 1 1 2 2015 m o d 2017 2016! - 2015! \equiv -1-1 \equiv -2 \equiv 2015 \mod 2017 .

Moderator note:

Good observation and explanation!

I think this answer is wrong because.... (2016!-2015)/2017 =2015! (2015)/2017 =2017!2015/(2015.2016.2017) =2015!

Haritam Bindua - 3 years, 8 months ago

So remainder is 0

Haritam Bindua - 3 years, 8 months ago
Ankit Chabarwal
Oct 18, 2016

2016 ! 2015 ! = 2015 2015 ! 2016! - 2015! = 2015*2015!

By Wilson's Theorem, 2016 ! 2016 ( m o d 2017 ) 2016! \equiv 2016 \pmod {2017}

So, 2015 ! 1 ( m o d 2017 ) 2015! \equiv 1 \pmod {2017}

( 2015 ! ) 2015 2015 ( m o d 2017 ) \implies (2015!)2015 \equiv \boxed {2015} \pmod {2017}

Maya Nachesa
Aug 4, 2016

So this solution relies more on seeing a pattern:

The first few factorials are as follows: 3! - 2! = 4 4! - 3! = 18 5! - 4! = 96 6! - 5! = 600 7! - 6! = 4320

The next thing to do is to divide the equations by the next factor and see what the remainders are, for example:

(3! - 2!)/4 = 1 with no remainder. However (4! - 3!)/5 has a remainder of 3, which is the b in (a! - b!)/c. Notice that 5 is a prime. (5! - 4!)/6 = 16 with no remainder. (6! - 5!)/7 has a remainder of 5, again the b and 7 being a prime.

Thus, I figured that if the equation is (a! - b!)/c and c is a prime, then the remainder should be b.

(2016! - 2015!)/2017 has a remainder of 2015.

Jason Williams
Aug 11, 2016

since 2017 is prime, it has no divisor less than 2017. 2016! -2015! = (2016 - 1) * 2015! = 2015 * 2015! since 2015! is the product of all positive integers less than or equal to 2015, the remainder is the sum of all divisors times 2015 = -2 (mod 2017) the sum is ( 2015 + 1 ) ( 2015 ) 2 \frac{(2015+1)(2015)}{2} , and when multiplied by -2, the result is 2016 2 ( 2 ) 2 = 2016 2 = 1 2 = 2 = 2015 \frac{2016}{2}*(-2)^2=2016*2=-1*2=-2=2015

Anna Anant
Nov 15, 2014

2015 or -2. From wilson 2016!=-1mod2017. Hence 2016 2015!=-1mod2017 => (2017-1) 2015!=-1mod2017 => 2015!=1mod2017. Overall the remainder is -2

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...