Prime Numbers Math Example 2

Follow the full solution, then compare it with the other examples linked below.

Example 2

medium
Determine whether 9797 is prime.

Solution

  1. 1
    Find 979.85\sqrt{97} \approx 9.85. We only need to test primes up to 9: 2,3,5,72, 3, 5, 7.
  2. 2
    9797 is odd (not divisible by 2). 9+7=169 + 7 = 16, not divisible by 3. Does not end in 0 or 5 (not divisible by 5). 97÷713.8697 \div 7 \approx 13.86 (not exact).
  3. 3
    No prime up to 97\sqrt{97} divides 9797, so 9797 is prime.

Answer

97 is prime97 \text{ is prime}
To test primality, check divisibility only by primes up to n\sqrt{n}. If none divide evenly, the number is prime. This drastically reduces the number of checks needed.

About Prime Numbers

Integers greater than 1 whose only positive divisors are 1 and themselves—they cannot be factored further.

Learn more about Prime Numbers →

More Prime Numbers Examples