

(n - 1) ! ≡ (n-1) mod n C Program for Prime Numbers Using For Loop Algorithm to Find Prime Number Wilson’s Theorem: According to this theorem, a natural number n (where n >1) is said to be a prime number if and only if the following conditions hold true.Prime Number Theorem: According to this theorem, the probability of a randomly selected number n to be a prime is inversely proportional to the log(n) or the digits in the number n.Fermat’s Little Theorem: According to this theorem, for any prime number n, there lies a number p in the range [1, n) such that,.A number is said to be a semiprime if it can be represented as a product of two prime numbers. Lemoine’s Conjecture: According to this theorem, an odd integer n (where n > 5) can be represented in the form: (odd prime + even semiprime).


