Skip to content
Number Theory Guide

Number Theory Level 2: Primes (<= 50). prime trial tests.

1. Limit trial divisors

1. Limit trial divisors
Only test prime divisors up to the square root.

Only test primes up to the square root.

Only test primes up to the square root.

2. Test small primes

2. Test small primes
Limit trial divisors

A factor settles the result; otherwise continue to the limit.

A factor settles the result; otherwise continue to the limit.

3. Read prime result

3. Read prime result
Limit trial divisors
Test small primes
Prime

Read whether a factor was found.

47 is prime.