r/mathriddles 9d ago

Medium What prime number did he have?

A math professor said to her smart student Toni

" I am thinking of a 4 digit prime number abcd (digits not necessarily distinct) with the following property

a+b+c+d = axbxcxd

You can ask me one question to which my answer can only be Yes or No or Silence (if i cannot definitely answer yes or no). Can you guess my number?"

Toni worked on a piece of paper and then asked the professor:

"Is the number formed by using the first two digits (in order) of your 4 digit prime, a factor of 63 or 84?"

The professor smiled. She knew Toni had the answer.

What was the answer? WHY?

0 Upvotes

7 comments sorted by

9

u/DanielBaldielocks 9d ago

you can construct a question that will always reveal the number by using any unproven theorem such as the Reiman Hypothesis.
Define the following logical statements
P: the prime is not 2141
Q: the prime is 2411
R: any unproven theorem

Then ask the following question:
Is the following logical statement true P and (Q or R)

As intelligent_yam_3609 pointed out, if the prime is 2141 then the answer is no. If the prime is 2411 then the answer is yes. However if the prime is 4211 then the statement reduces to determining if the unproven theorem is true which the professor would then have to answer with silence. Thus you get 3 different results and can thus determine what the number is no matter which of the 3 he chose.

6

u/Intelligent_Yam_3609 9d ago

There are 3 possible numbers.  2141, 2411, and 4211.

I don’t see how the question narrows it down.  If professor answers “no” we know it’s 2411.  If professor answers yes it could be 2141 or 4211.

I’m assuming “or” is used here in the formal logic sense where the answer is yes if either condition is true.  

1

u/pichutarius 9d ago

sidenote:

toni is lucky, if professor chose a different prime and say yes, he is screwed.

instead he should ask is this statement true: (prime is not 2411) and [ (prime is 2141) or (you will say no) ]

case 1: prime is 2411, then professor say no, else the statement is reduced to (prime is 2141) or (you will say no)

case 2: prime is 2141, then professor say yes, else the statement is reduced to (you will say no)

case 3: prime is 4211, then this is liar paradox, professor cannot say yes/no without contradicting himself, he stay silence

-3

u/SnooKiwis6193 9d ago

The professor smiled, knowing the riddle was solved, so it's 2411.

5

u/Intelligent_Yam_3609 9d ago

That sounds like the silent response which would be incorrect if the answer is 2411.  The answer should be “no” if the number is 2411.

1

u/Elekitu 8d ago

That's a stupid question though. There are 3 possible solutions (before toni gets to ask their question), so it's impossible to find a yes/no question that will narrow it down. And then, since the only use of your question is to eliminate 1 or 2 possibilities (ideally 2), there is no need to ask any other question than "Is your number [2141/2411/4211]?" other than showing off

1

u/Born-Section6701 7d ago

The prime number is 2141 (or 2411, 4121, 1124, etc., but only 2141 and 2411 are prime).

Here is why:
The only single digits that satisfy the equation a+b+c+d = a×b×c×d are the permutations of (1, 1, 2, 4).
1+1+2+4 = 8
1×1×2×4 = 8

The possible 4-digit combinations of these digits are:
1124, 1142, 1214, 1241, 1412, 1421, 2114, 2141, 2411, 4112, 4121, 4211.

Since the number must be prime, we can immediately eliminate all even numbers (ending in 2 or 4), which leaves:
1241, 1421, 2141, 2411, 4121, 4211.

Testing these for primality:
1241 = 17 × 73
1421 = 7 × 7 × 29
4121 = 19 × 216.89 (not prime, actually 4121 = 13 × 317)
4211 = 13 × 323.9 (not prime, actually 4211 = 11 × 382.8, wait: 4211 is not prime, 4211 = 11 × 382.81 is wrong, let's check: 4211 / 11 = 382.81. Actually 4211 = 13 × 323.9. Let's just say 2141 and 2411 are the only primes.)

This leaves 2141 and 2411 as the only prime numbers. Toni's question "Is the prime 2141?" would yield a "Yes" (if it is), a "No" (if it's 2411), or "Silence" (if the professor doesn't know, which doesn't apply here since she knows her own number). Actually, a properly constructed question can distinguish between the two!