**From New Scientist #2139, 20th June 1998** [link]

I have 8 cards and each card has a whole number on the back. Not all the 8 numbers are the same. On the front of each card there is a true statement about the number on the back of the car. The eight statements are as follows:

“The number on the reverse of this card is…

… 2 plus the number of cards with an even number on them;

… the total of the 8 numbers, divided by 5;

… the number of cards with a prime on them;

… the number of cards with a number larger than 3 on them;

… the difference between the largest number on the cards and the second largest number on the cards;

… the difference between the smallest number on the cards and the second smallest number on the cards;

… the number of cards that have the largest number on them;

… the difference between the number of cards that have the smallest number on them and the number of cards that have the second smallest number on them.”

When a statement refers to a number on a card it means the number on the back of the card. And an extra clue, which you do not actually need, is that if card A has a higher number on it than card B then card A comes before card B in the above list of statements.

What are the 8 numbers on the cards? Give them in descending order.

[enigma984]

### Like this:

Like Loading...

By “whole number” I assumed the setter meant “a positive integer”.

The value on the first card has to be at least 2. If none of the other cards had even numbers then the first card would have to be 2, but then there would be 1 card with an even number, so it would have to be 3. Hence minimum value on the first card is 3. If all the cards had even numbers on, then the first card would be 10, so this gives us a limited range for the numbers on the cards.

The following Python program runs in 205ms.

Run:[ @repl.it ]Solution:The numbers on the cards are: 6, 4, 3, 2, 2, 1, 1, 1.There are no further solutions if 0 is allowed as a number on the cards. It is potentially possible that the last card could be 0, if there were the same number of cards with the smallest number and next smallest number.