# an arithmetic sum and product puzzle

Assume that $$X$$ and $$Y$$ are positive integers with $$1. Mr. S knows the value $$X+Y$$, and Mr. P knows the value $$XY$$. They then have the following conversation. Mr. S says to Mr. P : "You do not know the value of $$X$$ and $$Y$$" Mr. P responds to Mr. S: "Now that you said this to me, I know the values of $$X$$ and $$Y$$." Mr. S then responds : "So do I". Find $$X$$ and $$Y$$.

My (very inadequate!) thoughts on this puzzle so far are as follows. It is clear that $$X$$ and $$Y$$ cannot be two distinct primes-else P would know their values instantly. I also thought (assuming Goldbach's conjecture (is this legit?!) that $$X+Y$$ cannot be even. Because if $$X+Y$$ were even, Mr. S could not rule out the possibility that $$XY$$ is the product of two distinct primes. Thus, all even numbers in $$[1,Y]$$ can be ruled out. The same reasoning also rules out odd positive integers that are of the form $$2$$ added to an odd prime, and squares of primes in $$[1,Y]$$. The problem as stated did not give a numerical bound on $$Y$$. If it had-like (say) $$Y=100$$, I would be tempted to try cases and see which integers can be ruled in-many seem to be ruled out, and there could well be more than one solution. Is there a general argument that works for any positive integer $$Y$$ that I am missing?

• Your idea re Goldbach etc. was extremely useful in clarifying my thoughts about the numbers.
– user502266
Jan 12, 2020 at 11:57
• Perhaps Mr. S and Mr. P are bluffing? Jan 12, 2020 at 15:23
• Servaes. They could be! I sincerely hope not! They wasted a lot of my time if they did. Jan 12, 2020 at 22:52

A solution to this problem is $$X=4,Y=13$$.

Proof this works

S knows that $$(X,Y)$$ is one of $$(2,15)(3,14),(4,13),(5,12),(6,11),(7,10),(8,9)$$. The product $$XY$$ is then one of $$30,42,52,60,66,70,72$$. Each of these has at least two permissible expressions as a product and so P does not initially know the two values.

P knows that $$(X,Y)$$ is one of $$(2,26),(4,13)$$. However, if $$(X,Y)=(2,26)$$, then S could not exclude the possibility $$(X,Y)=(5,23)$$ when P would initially know the two values. So, once S has spoken, P knows that $$(X,Y)=(4,13)$$.

Now back to S who knows that P has been able to find the values. For each possible $$XY$$ other than $$52$$ he can see that P would not be able to distinguish between the solution with $$X+Y=17$$ and :-

$$XY=30$$. $$X=5,Y=6.$$

$$XY=42$$. $$X=2,Y=21.$$

$$XY=60$$. $$X=3,Y=20.$$

$$XY=66$$. $$X=2,Y=33.$$

$$XY=70$$. $$X=2,Y=35.$$

$$XY=72$$. $$X=3,Y=24.$$

Proving that there are no other solutions looks extremely messy!

• Thank you Mr. Dolan! I suppose one could try different numerical values of $Y$ to see if more solutions emerge. It may be reasonable to ask (if other solutions exist) what proportion of $Y^2$ makes up the solution set as $Y^2\rightarrow{\infty}$. Jan 12, 2020 at 23:10
• You could try but the problem is that even with this small example the number of possibilities is becoming very large. My impression as I worked through possibilities is that there are likely to be very few or no others.
– user502266
Jan 12, 2020 at 23:19
• Remember that P starts with the knowledge that $XY=52$.
– user502266
Jan 12, 2020 at 23:34