kids encyclopedia robot

Wilson's theorem facts for kids

Kids Encyclopedia Facts

Wilson's theorem is a cool idea in number theory that helps us figure out if a number is a prime number. A prime number is a whole number greater than 1 that can only be divided evenly by 1 and itself (like 2, 3, 5, 7, etc.).

Wilson's theorem tells us something special about a number n. It says that n is a prime number if and only if a certain equation is true. This means two things:

  • If n is a prime number, then the equation will always be correct.
  • If the equation is correct, then n must be a prime number.

The equation looks like this:

(n-1)!\ \equiv\ -1 \pmod n

Don't worry, it's simpler than it looks! Let's break it down.

What Does the Equation Mean?

The equation `(n-1)! \equiv -1 \pmod n` might seem tricky, but it's about remainders when you divide.

Understanding Factorials

The `(n-1)!` part means a factorial. A factorial of a number is when you multiply that number by every whole number smaller than it, all the way down to 1.

  • For example, `4!` (read as "4 factorial") is `4 × 3 × 2 × 1 = 24`.
  • So, `(n-1)!` means you multiply all the numbers from `(n-1)` down to 1.

Understanding Modulo Arithmetic

The `\equiv -1 \pmod n` part is about modulo arithmetic, which is like clock arithmetic.

  • When we say `A \equiv B \pmod n`, it means that when you divide `A` by `n`, you get the same remainder as when you divide `B` by `n`.
  • Or, it means that `A - B` is a multiple of `n`.
  • So, `(n-1)! \equiv -1 \pmod n` means that if you take `(n-1)!` and add 1 to it, the result will be a multiple of `n`. In other words, `(n-1)! + 1` can be divided by `n` with no remainder.

How Wilson's Theorem Works with Examples

Let's try some examples to see Wilson's theorem in action.

Example with a Prime Number

Let's pick a prime number, like n = 5.

  • First, we find `(n-1)!`, which is `(5-1)! = 4!`.
  • `4! = 4 × 3 × 2 × 1 = 24`.
  • Now, we check if `24 \equiv -1 \pmod 5`.
  • This means, is `24 + 1` a multiple of 5?
  • `24 + 1 = 25`.
  • Yes, 25 is a multiple of 5 (`25 = 5 × 5`).
  • So, `24 \equiv -1 \pmod 5` is true. This matches the theorem, because 5 is indeed a prime number!

Example with a Composite Number

Now, let's pick a number that is NOT prime (a composite number), like n = 6.

  • First, we find `(n-1)!`, which is `(6-1)! = 5!`.
  • `5! = 5 × 4 × 3 × 2 × 1 = 120`.
  • Now, we check if `120 \equiv -1 \pmod 6`.
  • This means, is `120 + 1` a multiple of 6?
  • `120 + 1 = 121`.
  • Is 121 a multiple of 6? No, because `121 ÷ 6` gives a remainder (it's `20` with a remainder of `1`).
  • So, `120 \equiv -1 \pmod 6` is false. This also matches the theorem, because 6 is not a prime number!

Who Discovered Wilson's Theorem?

Even though it's called Wilson's theorem, it was actually first stated by an Arab mathematician named Ibn al-Haytham (also known as Alhazen) way back around the year 1000.

Later, in the 1700s, an English mathematician named John Wilson rediscovered it. His teacher, Edward Waring, published it in 1770 and gave it the name "Wilson's theorem." The famous mathematician Joseph-Louis Lagrange was the first to prove that the theorem was true in 1771.

Wilson's theorem is a cool tool in number theory, even though it's not often used to test very large prime numbers in real life. For huge numbers, there are faster computer methods. But it's a very elegant and important idea in mathematics!

See also

A friendly robot, ready to learn about math!

kids search engine
Wilson's theorem Facts for Kids. Kiddle Encyclopedia.