Skip to content

Commit 02bc991

Browse files
Update README.md
1 parent 62a3c5d commit 02bc991

File tree

1 file changed

+2
-2
lines changed
  • Competitive Coding/Math/Primality Test/Fermat Method

1 file changed

+2
-2
lines changed

Competitive Coding/Math/Primality Test/Fermat Method/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ Given a number n, check if it is prime or not. This method is a probabilistic m
33
Fermat's Little Theorem:
44
If n is a prime number, then for every a, 1 <= a < n,
55

6-
a^n-1 = 1 mod (n)
6+
a^n-1 ~ 1 mod (n)
77
OR
8-
a^n-1 % n = 1
8+
a^n-1 % n ~ 1
99

1010

1111
Example:

0 commit comments

Comments
 (0)