BrainDen.com - Brain Teasers
• 0

# comparing primes

## Question

inspired by bonanova's puzzle, here's mine.

there are three boxes each containing a prime. it is known that the largest of the three is no more than twice the size of the smallest. (so 7, 11, 13 is the smallest possible values for the three boxes.)

you open one box, and must guess whether your number is smaller, larger or in between the other two values.

which should you guess?

## Recommended Posts

• 0

inspired by bonanova's puzzle, here's mine.

there are three boxes each containing a prime. it is known that the largest of the three is no more than twice the size of the smallest. (so 7, 11, 13 is the smallest possible values for the three boxes.)

you open one box, and must guess whether your number is smaller, larger or in between the other two values.

which should you guess?

One can enumerate the possible options after seeing the number in the first box?

For example, say the number in the first box is 31.

If 31 is to be the smallest of the lot, then the largest can be max 61 and min 41, so we have the following possibilities:

If largest is 41: (31, 37, 41) -> 1 possibility

...

If largest is 61: (31, 37 or 41 or 43 or 47 or 53 or 59 , 61) -> 6 possibilities.

The total number of possibilities is: 1 + 2 + 3 + 4 + 5 + 6 = 21.

Or in general,

1. If p1 is the number in the first box

2. Let p2, p3, etc be the next prime numbers that occur in the integer sequence after p1.

2. Let pn be the highest prime that is less than 2*p1

3. The number of possibilities where p1 happens to be the smallest is: (n-2)*(n-1)/2

Next, if the number is to be the middle prime, again taking 31 as an example, the possible values are:

(19 or 23 or 29, 31, 37) -> 3 possibilities

(23 or 29, 31, 41) -> 2 possibilities

(23 or 29, 31, 43) -> 2 possibilities

(29, 31, 47) -> 1 possibility

(29, 31, 53) -> 1 possibility

Total: 9 possibilities.

Slightly harder to express this in general terms..

Finally, if the number is to be the largest, then we have the following possible triplets:

(17 or 19 or 23, 29, 31) -> 3 possibilities

(17 or 19, 23, 31) -> 2 possibilities

(17, 19, 31) -> 1 possibilities

Total: 1 + 2 + 3  = 6 possibilities.

Just like the first case (where p1 was to be the smallest), it can be expressed in slightly more general terms..

1. If p1 is the number in the first box

2. Let p2, p3, etc be the previous prime numbers that occur in the integer sequence before p1.

2. Let pn be the lowest prime that is greater than p1/2

3. The number of possibilities where p1 happens to be the largest is: (n-2)*(n-1)/2

We can go with the choice with the largest number of possibilities..

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account. ×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.