Solve the linear congruence
Enter the minimum non-negative value of .
Notation:
is the
factorial
notation. For example,
.
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.
Relevant wiki: Wilson's Theorem
Note first that n ≡ − ( 1 0 1 − n ) ( m o d 1 0 1 ) for 1 ≤ n ≤ 5 1 implies that
5 1 ! ≡ ( − 5 0 ) ( − 5 1 ) ( − 5 2 ) . . . ( − 9 9 ) ( − 1 0 0 ) ( m o d 1 0 1 ) ≡ ( − 1 ) 5 1 4 9 ! 1 0 0 ! ( m o d 1 0 1 ) .
Thus 4 9 ! 5 1 ! ≡ ( − 1 ) 5 1 1 0 0 ! ( m o d 1 0 1 ) ≡ ( − 1 ) ( − 1 ) ( m o d 1 0 1 ) ≡ 1 ( m o d 1 0 1 ) ,
since by Wilson's Theorem ( p − 1 ) ! ≡ − 1 ( m o d p ) for any prime p .