The following might be of some interest to you.
Wilson's Theorem
Wilson's Theorem stated that for every prime number "p", [(p + 1)! + 1] is evenly divisible by "p". The converse was shown to also be true in that every integer "n" that evenly divides [(n + 1)! + 1] is prime. Combining these leads to the famous general theorem that a necessary and sufficient condition that an integer "n" be prime is that "n" evenly divide [(n + 1)! + 1].
Example: For N = 5, (5 - 1)! + 1 = 24 + 1 = 25 is divisible by 5. For N = 11, (11 - 1)! + 1 = 3,628,000 + 1 = 3,628,001 is divisible by 11. On the other hand, for N = 12, (12 - 1)! + 1 = 39,916,800 + 1 = 39,916,801 is not divisible by 12.
* Fermat's Theorem
Fermat's Little Theorem stated that if "a" is any whole number and "p" is a prime number relatively prime to "a", then "p" divides [a^(p-1) - 1]. A corollary to this is if "p" is any prime number and "a" is any whole number, then "p" divides [a^p - a]. With p = 7 and a = 12, the theorem tells us that 7 divides [12^6 - 1] = 2,985,983 which it does, yielding 426,569. Similarly, 7 divides [12^7 - 12] = 35,831,796 yielding 5,118,828. Trying p = 8 and a = 12, we get [12^7 - 1]/7 = 4,478,975.875, confirming that 8 is not prime.
* As with Wilson's theorem, it was logically asked if the converse of Fermat's Theorem was also true, i.e., is every integer "n" that evenly divides [a^(p-1) - 1] or [2^n - 2] a prime? This was pursued by Chinese mathematicians in exploring if "n" divides [2^(n-1) - 1], is "n" prime? They initially concluded that "n" would be prime if it divided [2^(n-1) - 1] but were later proven wrong when it was discovered that while the number 341 did evenly divide [2^340 - 1], 341 was itself composite, being equal to 11 times 31. There are supposedly an infinite number of composite numbers, "n", both odd and even, that divide (2^n - 2). They are referred to as pseudoprimes. When it was discovered that there were composite numbers that divided all (a^n - a), they were called absolute pseudoprimes. The smallest of the absolute pseudoprimes is 561.
* Primes of the form Mp = 2^p - 1 are called Mersenne primes where the exponent "p" is itself a prime. Mersenne primes contribute to the derivation of perfect numbers. A perfect number is one that is equal to the sum of its aliquot divisors, i.e., all its divisors except the number itself. (It is also said that a number is perfect if the sum of all its divisors, including the number itself, is equal to twice the number.) Numbers of the form 2^(p-1)[2^p - 1] are perfect when (2^p - 1) is a prime. For example, the primes 2, 3, 5, 7, 13, etc., lead to the Mersenne primes of 3, 7, 31, 127, 8191, etc., and the corresponding perfect numbers of 6, 28, 496, 8128, 33,550,336, etc. There are no odd perfect numbers, or rather, none have been discovered to date.
* The 35th Mersenne Prime, was discovered in late 1996, being 2^1,398,269 - 1 and having 420,921 digits.
On January 27, 1998, the largest known prime was [2^(3,021,377) - 1] having 909,526 digits.
* There are many formulas that yield primes but not all primes. The most misleading is x^2 - x + 41 which works fine up to x = 39 but breaks down for x = 40 and beyond. Others are 2x^2 - 199, x^2 + x + 11, x^2 + x + 17, x^2 - 79x + 1601, 6x^2 + 6x + 31, x^3 + x^2 - 349, to name a few. There are none that derive all the primes.