Prime Factorization Game

Three ways to play with prime numbers: break numbers down into primes, decide quickly whether a number is prime, and find all the primes up to 100 with the Sieve of Eratosthenes.

Choose your settings and press Start

Game

Numbers
Level

Layout
Crossing out

0:00

Report a bug

Only the site operators can read your report. It will not appear in public comments.

Do not include your name, school, address, contact details, or links. The game version and browser type are attached automatically. Privacy

ver 1.0.0 · Updated

Release notes
  1. · ver 1.0.0Added the version label and release notes.
  2. First published.

How to play the Prime Factorization Game

This is a free, single-player game for getting comfortable with prime numbers and prime factorization. There are three ways to play. In Prime factorization you keep dividing a number by primes until it is written as a product of primes. In Prime or not you decide, one number after another, whether each number is prime, racing a 60-second clock. In Sieve of Eratosthenes you cross out the multiples on a 1–100 chart until only the primes are left. There is nothing to download and no account to create, and it works with a mouse, a keyboard or a touch screen.

A quick refresher: a prime number is a whole number greater than 1 whose only divisors are 1 and itself — 2, 3, 5, 7, 11, 13 and so on. The number 1 is not prime. Every other whole number above 1 is composite, which means it can be written as a product of primes. That product is its prime factorization, and it is always the same, no matter in which order you divide.

How to find the prime factorization with a factor tree

A factor tree for 360. 360 splits into 2 and 180, 180 into 2 and 90, 90 into 2 and 45, 45 into 3 and 15, and 15 into 3 and 5. Every prime is circled. Below: 360 = 2 × 2 × 2 × 3 × 3 × 5 = 2 cubed × 3 squared × 5
Put the prime on the left and the quotient on the right, and keep going until the right-hand number is prime.

Choose Prime factorization and press Start. The number to break down appears in a blue box. Below the picture is a row of prime buttons: 2, 3, 5, 7, 11, 13, 17, 19 and 23. Tap one that divides the number exactly. If you are right, the prime drops down to the left in a circle, the quotient drops down to the right, and the quotient becomes the new number in the blue box. Keep splitting. When the number that is left is itself prime, press It’s prime (pressing that same prime’s button works too) and the number is done.

At the end of each number you see the full answer written two ways: as a plain product, such as 360 = 2 × 2 × 2 × 3 × 3 × 5, and in exponent form, 360 = 2³ × 3² × 5. A round has ten numbers, and the timer runs until you finish all of them.

The ladder method (upside-down division)

The ladder method for 360: 2 into 360, 2 into 180, 2 into 90, 3 into 45 and 3 into 15, stacked downward, with the final 5 circled. Notes: prime on the left, quotient below; try small primes first; stop when the bottom number is prime; multiply the primes on the left and the bottom number
The same factorization written as a ladder of short divisions.

If you prefer the ladder method — sometimes called the cake method or repeated division — switch Layout to Ladder in the settings. Each step is a short division written upside down: the prime goes on the left, the quotient goes underneath, and you stop when the bottom number is prime. The answer is every prime down the left side times the number at the bottom. The buttons and the answer are exactly the same as with the factor tree, so pick whichever layout you are used to.

What happens when you make a mistake

After 360 has been split into 2 and 180, pressing 7 shows in red: 180 ÷ 7 = 25 remainder 5, so it can’t be divided by 7. Below: 180 ends in 0, an even digit, so it divides by 2: 180 ÷ 2 = 90
A wrong prime shows why it doesn’t work and how to find one that does.

Press a prime that does not divide the number and the game tells you why, in red — for example “180 ÷ 7 = 25 remainder 5” — and then shows how to spot a prime that does work: “180 ends in 0, an even digit, so it divides by 2.” The same thing happens if you press It’s prime while the number can still be split. If you are stuck, press Hint for a nudge about where to look. Each mistake or hint adds five seconds, so your score is your time plus 5 seconds per mistake or hint.

Divisibility rules for 2, 3 and 5

Divisibility rules. Divisible by 2: last digit 0, 2, 4, 6 or 8 (136). Divisible by 3: digit sum is a multiple of 3 (126, since 1 + 2 + 6 = 9). Divisible by 5: last digit 0 or 5 (145). 7 and bigger primes: just try the division (91 ÷ 7 = 13). Below: to test for a prime you only need primes p with p × p up to the number; 97 is not divisible by 2, 3, 5 or 7 and 11 × 11 = 121 is bigger than 97, so 97 is prime
For 2, 3 and 5 you can tell just by looking at the digits.

The fastest way to get better at prime factorization is to recognize the small primes at a glance.

To decide whether a number is prime, divide by the primes in order and stop as soon as p × p is bigger than the number. For 97, none of 2, 3, 5 and 7 divides it, and the next prime, 11, already gives 11 × 11 = 121 > 97. So 97 is prime.

Prime or not: how to play

Prime or not. Left: 97 appears and Prime is correct, because it is not divisible by 2, 3, 5 or 7 and 11 × 11 = 121 is bigger than 97. Right: 91 appears and Prime is wrong; 91 is not divisible by 2, 3 or 5 but 91 ÷ 7 = 13
A wrong answer pauses the clock so you can read the reason.

Numbers appear one at a time. Tap Prime if the number is prime and Not prime if it isn’t. After a 3-2-1 countdown you have 60 seconds, and your score is the number of correct answers. When you get one wrong, the clock stops and the explanation appears, such as “91 is not prime: it can’t be divided by 2, 3 or 5, but it divides by 7.” Press Next to carry on. Every mistake takes five seconds off your time, so careful answers beat fast guessing.

On the easy level the number 1 can come up; the right answer is Not prime. On a keyboard, F or the left arrow means Prime and J or the right arrow means Not prime.

Sieve of Eratosthenes

Three 1–100 charts. First: 1 crossed out, 2 circled and the multiples of 2 crossed out. Second: the multiples of 3, 5 and 7 crossed out as well. Third: the 25 numbers left are circled. The line color and small number in each crossed-out square show which prime removed it
Once the multiples of 7 are gone, every number left on the chart is prime.

The Sieve of Eratosthenes is a classic way to find all the primes up to a limit. First tap 1 to cross it out, since 1 is not prime. Then circle the smallest number still standing, 2, and cross out its multiples: 4, 6, 8 and so on up to 100. Circle the next number still standing, 3, and cross out its multiples, then do the same for 5 and 7.

When you circle 11, the game points out that 11 × 11 = 121 is already past 100, so every multiple of 11 on the chart has been crossed out by a smaller prime. Everything left is prime, and the remaining numbers are circled for you. There are 25 primes between 1 and 100. Each crossed-out square keeps a small number and a colored line showing which prime removed it, so you can see at a glance that 49 is the first number the 7s remove, or that 91 is a multiple of 7. If tapping every multiple feels like too much, choose Automatic under Crossing out: you only circle the primes and their multiples disappear on their own.

Levels, scores and the daily challenge

LevelPrime factorizationPrime or not
Easy2-digit numbers like 12, 60, 84 or 911 to 99
Medium3-digit numbers like 126, 360 or 504100 to 999
Hard4-digit numbers like 1260 or 25201000 to 9999

In prime factorization mode, every prime except the last one is on the buttons (23 or less), and the last one is never bigger than 97. In Prime or not, about half of the numbers are prime on every level. The composite ones are a mix of numbers you can spot from the last digit or the digit sum, and trickier ones whose smallest factor is 7, 11 or more.

Your best score is saved for each game and level, and you get a “New personal best!” badge when you beat it. The Daily challenge gives everyone the same 3-digit numbers on the same day, so you can compare results with friends or family.

Printable prime factorization worksheets

Press Printable under the game to print a prime factorization worksheet (12 or 24 numbers), a “find the primes” sheet where you circle the primes (40 or 80 numbers), or a blank Sieve of Eratosthenes chart. The answers go on a separate page, and you get new numbers every time. Paper size can be US Letter or A4.

Prime factorization tips

1. Start with the smallest prime

The answer is the same in any order, but trying 2, then 3, then 5, then 7 means you never skip a factor. Keep dividing by 2 while you can, then move on to 3, and so on.

2. Look at the digits before you divide

A last digit of 0 means the number divides by both 2 and 5. A digit sum that is a multiple of 9 means you can divide by 3 twice. Checking the digits first saves a lot of long division.

3. Split off tens and hundreds

Seeing 360 as 36 × 10, and 36 as 6 × 6, turns a big number into multiplication facts you already know. Remember that 10 = 2 × 5 and 100 = 2² × 5².

4. Double-check the last number

Before you call the last number prime, make sure it isn’t a look-alike such as 51 (3 × 17) or 91 (7 × 13). Test primes until p × p passes the number.

5. Write the answer with exponents

2 × 2 × 2 × 3 × 3 × 5 is usually written 2³ × 3² × 5, with the primes in increasing order. It is shorter and easier to check.

6. Learn the common squares and powers

Knowing that 49 = 7², 121 = 11², 169 = 13², 64 = 2⁶ and 81 = 3⁴ makes both prime factorization and Prime or not much quicker.

Prime factorization FAQ

Is 1 a prime number?

No. A prime must be greater than 1 and have exactly two divisors. If 1 counted as prime, prime factorizations would no longer be unique — 6 could be 2 × 3, or 1 × 2 × 3, or 1 × 1 × 2 × 3 — so mathematicians leave it out.

Is 2 the only even prime?

Yes. Every other even number is divisible by 2, so it has at least three divisors.

What is the difference between factors and prime factors?

Factors are all the numbers that divide a number exactly; 12 has the factors 1, 2, 3, 4, 6 and 12. Prime factors are the factors that are prime — for 12 they are 2 and 3 — and the prime factorization shows how many times each one is used: 12 = 2² × 3.

What is prime factorization used for?

It helps you list all the divisors of a number, find the greatest common factor and least common multiple, simplify fractions and simplify square roots (√72 = 6√2). The fact that factoring very large numbers is extremely hard is also what keeps some kinds of internet encryption secure.

Where are my scores saved?

Scores and unfinished games are saved only in the browser on your device. If you leave in the middle of a round, press Continue to pick up where you left off. There is no sign-up or login.

A short history of prime numbers

Prime numbers were already being studied in ancient Greece more than two thousand years ago; Euclid’s Elements contains the famous proof that there are infinitely many of them. The sieve method is credited to Eratosthenes of Cyrene, a Greek scholar of the 3rd century BC, and the earliest surviving description of it comes from Nicomachus several centuries later. The name comes from the way the method works: like a sieve, it lets the composite numbers fall through and keeps only the primes.