# Another Reasoning Puzzle From ChefMongoose

My friend ChefMongoose had another reasoning problem come to him, and I’m happy to share it further. It’s rather like that famous Singapore Birthday Problem that drove people crazy a couple of months ago. Here’s the problem:

I have a combination lock at work. There are three digits, all in the range 1 – 40; they’re all prime numbers. They’re X+Y, X+2Y, X+3Y — where X and Y are positive integers.

If I told you what X was but not Y, you wouldn’t be able to tell me the combination. If I told you what Y was but not X, you wouldn’t be able to tell me the combination. Now, what’s the combination?

I did work out the puzzle. It did make me notice a couple of strings of uniformly-spaced prime numbers I hadn’t done before, too, such as 3-13-23. (However, 3-13-23 isn’t one of the possible answers, because of the constraints of the problem. There aren’t positive X and Y for which X + Y = 3, X + 2Y = 13, and X + 3Y = 23.)

As with the Singapore Birthday Problem, this is a puzzle based on reasoning about the information we have. Mercifully there aren’t actually many prime numbers below 40, so if you want you can take the brute force approach and find all the strings of uniformly-spaced prime numbers. Then you can find what one matches the rules in ChefMongoose’s second paragraph.

I confess I wasn’t that systematic. I had a strong suspicion what the starting number of the sequence had to be, and then did some tests to be sure. I credit that to just having stared at lot at the smaller prime numbers in my life, so I’d had some intuitive feel for it. That’s a dangerous way to work. My intuitive feel, for example, hadn’t warned me about 3-13-23. But then there aren’t other trios of prime numbers spaced by ten, so that set would be ruled out by the “If I told you what Y was but not X” constraint. But now I know how to get stuff out of ChefMongoose’s work locker, you know, just in case. ## Author: Joseph Nebus

I was born 198 years to the day after Johnny Appleseed. The differences between us do not end there. He/him.

## 13 thoughts on “Another Reasoning Puzzle From ChefMongoose”

1. Chiaroscuro says:

You certainly could!

If I told you the locker number.

Which I’ll have to think about mathwise a little further for.

Like

1. Joseph Nebus says:

I’d just assumed it would be the one with your name on it.

Actually, I’d assumed it would be the one just low enough you have to bend uncomfortably far, but not low enough you can sit on a bench or stool, because that’s where everybody’s locker is.

Like

2. Geoffrey B says:

Hm, let’s see how far I can avoid trial-and-error methods here.

If X+Y=2, then X+3Y is even and larger than 2, which means it can’t be prime, ergo contradiction.

It follows that none of X+Y, X+2Y, X+3Y can be equal to 2, hence they can’t be even, which implies that X is odd and Y is even.

Applying the “knowing Y is not enough to find X” rule:

If Y is NOT a multiple of 3, then one of X+Y, X+2Y, X+3Y must be a multiple of 3. The only such prime is 3, and since this is the smallest possible prime after eliminating 2, that implies that X+Y=3, i.e. X=1, Y=2.

But this means that if Y is not a multiple of 3, then knowing Y would be enough to figure out the combination, which contradicts info given.

Hence Y must be a multiple of 2 and 3, i.e. a multiple of 6. It also follows that X cannot be a multiple of 3, else X+Y would be nonprime.

X+3Y is no greater than 40, hence X <= 40-3Y. If Y is 18 or higher, this would make X negative, which isn’t allowed.

If Y = 12, then X <= 4. We already know X is odd and not a multiple of 3, which means X must equal 1. Hence, knowing Y=12 would be enough to find X and solve the problem, not allowed.

This means that Y has to equal 6. Our sequence becomes X+6, X+12, X+18. X is not a multiple of 2 or 3, and must be less than 22. Hence the only possible values for X are 1, 5, 7, 11, 13, 17.

Of these values 7, 13, and 17 give non-prime numbers in the sequence and can be eliminated, so we’re down to three possibilities:

X=1, Y=6 (combination 7, 13, 19)
X=5, Y=6 (11, 17, 23)
X=11, Y=6 (17, 23, 29)

Now, forgetting the “knowing Y is not enough to find X” rule and applying the “knowing X is not enough to find Y” rule: if we knew the value of X out of those three, what could we deduce about Y?

Knowing X>1 would tell us that X+Y > 3, hence none of the numbers in the combination can be a multiple of 3. This then implies that Y must be a multiple of 3. We already established that Y is even (without needing to invoke the “knowing Y doesn’t give us X” value). But if X >= 5, Y can’t be greater than (40-5)/3 < 12, so Y could only be 6.

Hence, knowing X=5 or X=11 would be enough to deduce Y. Contradiction. So the only candidate solution left is X=1, Y=6, combination = 7, 13, 19.

We’ve shown that anything else contradicts the information given, but we still need to confirm that this solution IS legit. Perhaps there’s some other way we haven’t explored in which knowing X=1 would tell us Y=6, or vice versa?

If we’re told X, but not Y, we can’t rule out the solution X=1, Y=2 i.e. combination = 3, 5, 7.

If we’re told Y, but not X, we can’t rule out the solution X=5, Y=6, i.e. combination = 11, 17, 23. (Or the solution where X=11, Y=6.)

So we’re done. The combination is 7, 13, 19. Little bit of case-checking but not too much trial and error.

Like

1. Joseph Nebus says:

Excellently done, yes. Full marks.

As I hinted in the original post, my instinct was that “7 has got to be one of the numbers” and then it was a matter of could I rule out 3-5-7, 3-7-11, or any of the other sequences starting with 7. And then double back to see if there was reason to doubt 7-13-19. Nowhere near as safe, of course.

Like

3. davekingsbury says:

Your posts are a wonderful mystery to me, like reading shamanic texts! I had a maths block at school when I returned from illness and the teacher pilloried me for not understanding hundreds, tens and units. Quite proud of being able to do Sudoku, though …

Like

1. Joseph Nebus says:

Aw, dear, I’m sorry to be mysterious. I hope you do enjoy the experience though. There’s a lot of beauty in the subject, and a lot of it can be understood without needing to do calculations. A numbers-riddle puzzle obviously isn’t one of them, though.

Like

1. davekingsbury says:

Yeah, don’t understand everything but like reading for the gist. Just bought Simon Singh’s Fermat’s Last Theorem and looking forward to it.

Like

4. Garfield Hug says:

Ha ha you knew about our math problem 😉

Like

1. Joseph Nebus says:

Oh, yes, the Singapore Birthday Problem got to be quite popular for a week or so back around late summer. It was driving several of my friends crazy and they weren’t too happy even after the explanation was given. The New York Times did a good writeup on it that seems to have settled most people’s questions, at least.

Liked by 1 person

1. Garfield Hug says:

Lol! It seems USA is buying up our math, science, physics test papers and books for use in their schools. Apparently we are “famous” for setting mind boggling questions😉

Like

5. John Quintanilla says:

Reblogged this on Mean Green Math and commented:

I enjoyed this challenge.

Like

1. Joseph Nebus says:

Very glad you liked it and I’ll pass the word on to the puzzle’s author.

Like

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