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!


brain icon

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.

brain icon


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.

One response

  1. Paul Avatar

    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.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

By submitting this form, you give CSIRO permission to publish your comments on our websites. Please make sure the comments are your own. For more information please see our terms and conditions.

Why choose the Double Helix magazine for your students?

Perfect for ages 8 – 14

Developed by experienced editors

Engaging and motivating

*84% of readers are more interested in science

Engaging students voice