### Brain Teasers

# Prime Ponderings

What are the largest and smallest 5-digit numbers that satisfy the following conditions?

1. Each digit of the number is a prime digit.

2. Each successive pair of digits forms a 2-digit number that is NOT a prime number.

3. Each of the prime digits must appear at least once in the 5-digit number.

1. Each digit of the number is a prime digit.

2. Each successive pair of digits forms a 2-digit number that is NOT a prime number.

3. Each of the prime digits must appear at least once in the 5-digit number.

### Answer

Largest - 35772Smallest - 32257

Prime digits are 2, 3, 5 and 7. Taken as pairs, the only combinations that fit criterion 2 are:

22, 25, 27, 32, 33, 35, 52, 55, 57, 72, 75 and 77.

Of that list, 33 is the only number that contains a 3 as the second digit and so for criterion 3 to be satisfied, 3 can only appear at the start of the 5-digit numbers. From there it is simply a matter of choosing the next digits using the list above so that criterion 2 is satisfied, making sure that criterion 3 is also satisfied.

Hide Answer Show Answer

## What Next?

**Solve a Similar Brain Teaser...**

Or, get a random brain teaser.

If you become a registered user you can vote on this brain teaser, keep track of

which ones you have seen, and even make your own.

## Comments

Very nice one. I'd probably have solved it better if I hadn't misread criterion 3. I thought it said each must appear only once, and decided you must have counted 1 as a prime digit. There's no solution to that one. Sigh. Once I got over that, I saw the answer.

Jan 02, 2005

Great puzzle. I enjoyed it.

"Of that list, 33 is the only number that contains a 3 as the second digit and so for criterion 3 to be satisfied, 3 can only appear at the start of the 5-digit numbers" hey, i don't get this part of the answer.. can u explain it more clearly? thanks

Good one. Very fun.

Enjoyable. I love prime numbers, they are a great mystery!

I enjoyed this math teaser

Good Job

Good Job

It was easier to list the numbers that can,t be formed (23, 37, 53, 73) than the ones that can. This made the requirement of starting with a 3 clear and the rest was easy.

@jimrcook - I made the same mistake, but if you include 1 as a 'prime digit' the smallest is 32157 and the largest 35721.

1 is a prime number and is not included in this. why?

By definition, 1 is not a prime number.

## Follow Braingle!