Pi Garden

🌱 Factors · multiples · primes

Primes Won’t Be Boxed

Most numbers can be laid out as a neat rectangle. The ones that can’t are the primes.

Take twelve seeds and lay them out in a tidy rectangle.

Three rows of four works perfectly.

Now try thirteen.

However you arrange them, you get a leftover or one long line.

The puzzle

Making rectangles out of seeds

If you can line seeds up into a full rectangle with no gaps and none left over, the two sides are a pair of factors. 12 makes a neat 3 × 4. But 13 can’t make a rectangle: whatever you try, you get a single strip.

12 → a tidy 3 × 4 it makes a rectangle 13 → only one long line

Your turn → Pick any number up to 60. Tap the chips, or use −1 and +1, to see every rectangle that number can make.

12

Some numbers look prime.

They’re odd, and they aren’t in any times table you know by heart.

Most of the time, they aren’t.

The trap

Odd is not the same as prime

This is where nearly everybody gets caught. Pick one of these numbers and answer before you check, then stick with your answer.

Is 51 prime?

Every rectangle has two sides.

So factors always come in pairs.

Why pairs

Factors come in pairs

Every rectangle gives you two factors at once: 1×12, 2×6, 3×4… and after that the pairs repeat the other way round. Pick a number and see its factors joined in pairs by the arcs.

Take 12’s rectangle, 3 × 4. Read it one way and it’s 3 rows of 4. Turn your head sideways and it’s 4 rows of 3. The dots haven’t changed.

You can read one rectangle two ways, so every rectangle you find gives you a pair of factors at once.

You don’t have to go looking for each prime.

Cross out every number that makes a rectangle, and the numbers left are the primes.

The sieve

Find the primes by sweeping away everything else

A Greek librarian called Eratosthenes worked this method out over two thousand years ago. Sweep away every number that makes a rectangle, and the numbers left are the primes. Four sweeps are enough for every number up to 60.

Why stop at 7? Because 8 × 8 is 64, which is already past 60, so any number up to 60 that makes a rectangle must have a side of 7 or less. The sieve leaves out 1, because it isn’t prime or composite.

An old friend

Sixty and its neighbours

Tap 60 and the numbers next to it, and count how many factors each one has.

Here’s the most important part.

Every whole number bigger than 1 is made of primes multiplied together.

There’s only one way to do it for each number. 60 = 2 × 2 × 3 × 5, and no other set of primes multiplies to 60.

That’s why people call primes the atoms of numbers: every other number is built from them.

Every whole number above 1 is built from numbers that can’t make a rectangle.

Primes are useful, too. The codes that protect bank cards multiply two huge primes together (each hundreds of digits long), because nobody can quickly work backwards from the answer to find them.

Pass it on

Next time someone says 51 is prime (or that 1 is), draw them the rectangle: three rows of seventeen. If a number makes a rectangle, it isn’t prime, and now you can prove it.

Every other number is built from primes, like 60 = 2 × 2 × 3 × 5.