## Prime number brainteaser

By David Shaw, 9 March 2023

**Difficulty: Extreme**

123,456,789 is not a prime number. Is it possible to reorder its digits to give a prime number?

(What’s a prime number? When you divide a prime number by any whole number except 1 or itself, you don’t get a whole number answer!)

**Scroll down or click for a hint, or the answer!**

## Brainteaser hint

Your computer probably has a calculator app that you can use to try dividing some re-arrangements. Make sure it can handle 9 digit numbers first though!

Once you’ve spotted a pattern, you can search the internet for divisibility rules and see if you can prove your hunch.

## Brainteaser answer

The key to this brainteaser is divisibility by 3. For any number, if you add its digits together and the answer is divisible by 3, the first number is also divisible by 3.

If you add the digits 123,456,789 together you get 45, which is divisible by 3. No matter how you re-arrange those digits, they’ll still add up to 45.

So whatever number you make, it will be divisible by 3 and therefore not a prime number.

If you’re after more brainteasers and puzzles for kids, subscribe to Double Helix magazine!

Subscribe now!
9 March, 2023 at 12:40 pm

That number is divisible by 9 and will remain so no matter how the digits are arranged. There is no need to add all the digits. ‘Casting out nines’ is an efficient process. The 9 digit is the first thing to cast out. The other digits all sum to 9: 1 plus 8, 2 plus 7, and so on.