Labels

Monday, September 26, 2011

wilsons theorem

Here's an interesting characterization of primes but useless Wilson's Theorem. A number P is prime if and only if (P-1)! + 1 is divisible by P.Let's check: (2-1)!+1 = 2, which is divisible by 2. (5-1)!+1 = 25, which is divisible by 5. (9-1)!+1 = 40321, which is not divisible by 9 (cast out nines to see this). Pretty cool!

No comments:

Post a Comment