Learn to calculate by playing with Prime number checker
A short game to see where the result comes from. Pick a language and start; you can stop halfway and come back.
Loading the game…
← Back to Prime number checker
What you will practise
Check whether a number is prime and break it down into its prime factors.
How it works
Divisors are tested from 2 up to the square root of the number, dividing whenever the division is exact. Whatever remains at the end, if greater than one, is prime as well.
The divisor count follows from the exponents in the factorisation.
Formula
n = p₁^a₁ · p₂^a₂ · … · pₖ^aₖ
Number of divisors: (a₁ + 1) · (a₂ + 1) · … · (aₖ + 1)
Worked example
360 = 2³ × 3² × 5
Divisors: (3+1) × (2+1) × (1+1) = 24
It is not prime because it has more than two divisors.
How to play
First pick your language. Then work through the challenges one by one: each sets out a case with real numbers and, if you get stuck, you can ask for a hint. When you answer, you see whether you got it right and why. Progress is saved only in your browser, so you can stop halfway and carry on another day.