Does Wilson's Theorem Help?

Find the largest possible value of n n such that, when n ! n! is divided by 2017, it gives a remainder of 1.


Notation: ! ! is the factorial notation. For example, 8 ! = 1 × 2 × 3 × × 8 8! = 1\times2\times3\times\cdots\times8 .


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.

1 solution

Marco Brezzi
Aug 18, 2017

If n 2017 n\geq 2017

2017 n ! 2017 n ! 1 2017\mid n! \Longrightarrow 2017\nmid n!-1

If n = 2016 n=2016 , by Wilson's theorem

2016 ! 1 m o d 2017 2016 ! 1 2 m o d 2017 2017 2016 ! 1 \begin{aligned} 2016!\equiv -1\mod 2017 &\Longrightarrow 2016!-1\equiv -2\mod 2017\\ &\Longrightarrow 2017\nmid 2016!-1 \end{aligned}

If n = 2015 n=2015

2016 ! 2016 m o d 2017 gcd ( 2016 , 2017 ) = 1 2015 ! 1 m o d 2017 2015 ! 1 0 m o d 2017 2017 2015 ! 1 \begin{aligned} 2016!\equiv 2016\mod 2017&\overset{\gcd(2016,2017)=1}{\Longrightarrow} 2015!\equiv 1\mod 2017\\ &\Longrightarrow 2015!-1\equiv 0\mod 2017\\ &\Longrightarrow 2017\mid 2015!-1 \end{aligned}

Thus, 2015 \boxed{2015} is the largest number that satisfies the constraint

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...