Mudd Math Fun Facts!
hosted by the Harvey Mudd College Math Department created, authored and ©1999-2007 by Francis Su
You can now subscribe to our RSS feed to get the latest Fun Facts!
Get a random Fun Fact!
No subject limitations
Search only in selected subjects
    Algebra
    Calculus or Analysis
    Combinatorics
    Geometry
    Number Theory
    Probability
    Topology
    Other subjects
  Select Difficulty  
Enter keywords 

  List All : List Recent : List Popular
  About Math Fun Facts / How to Use
  Contributors / Fun Facts Home
© 1999-2007 by Francis Edward Su
All rights reserved.


From the Fun Fact files, here is a Fun Fact at the Easy level:

Wilson's Theorem

Here's an interesting characterization of primes:

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!

The Math Behind the Fact:
However it is not really practical to use this to test if a number is prime, especially if P is large: just try P=101, and you'll see what I mean! There are better primality tests available; you can learn about some of them in a number theory class. See also Fermat's Little Theorem.

How to Cite this Page:
Su, Francis E., et al. "Wilson's Theorem." Mudd Math Fun Facts. <http://www.math.hmc.edu/funfacts>.

Bookmark this page on: | Digg this! | Del.icio.us | Technorati | Reddit | Fark | Squidoo | Furl | Blinklist | Yahoo MyWeb | Google | Stumbleupon |

Keywords:    number theory, primality test
Subjects:    number theory
Level:    Easy
Fun Fact suggested by:   Jorge Aarao
Suggestions? Use this form.
4.17
 
current
rating
Click to rate this Fun Fact...
    *   Awesome! I totally dig it!
    *   Fun enough to tell a friend!
    *   Mildly interesting
    *   Not really noteworthy
and see the most popular Facts!

Want another Math Fun Fact?

For more fun, tour the Mathematics Department at Harvey Mudd College!