# The sum of the cubes of two different prime numbers is 5256.

Is an simple way to solve the problem?

The sum of the cubes of two different prime numbers is 5256. What are the two primes?

Here is what I did: assume the two numbers are $x$ and $y$, then I have $x^3+y^3=5256$. I can try x and y, but I don't think it is the most effective method. Can anyone help me?

• Yes, try the biggest one first ($17$), since that will tell you immediately that $2, 3, 5$ are too small anyways. Then you're down to four. But the answer below is more constructive, so go for that. – Arthur Sep 19 '16 at 18:39
• Curiously enough, the only solution to the equation $x^3 + y^3 = 5256$ to use negative numbers involves two composite even numbers, e.g., $x = -14$. – Mr. Brooks Sep 19 '16 at 21:04

We might as well take $x \ge y$. Then $18 \gt \sqrt[3]{5256} \gt 17$, so $x$ cannot be greater than $17$. $x$ has to be at least $\sqrt[3]{5256/2} \gt 13$ so we know $x=17$ as it is the only prime in the range. Now $y=\sqrt[3]{5256-17^3}=7$ and we are done without checking any cases.

• (+1) this was my idea as well, but even more concise. – 6005 Sep 19 '16 at 19:51

Maybe the easiest way is notice that $$18^3 = 5832 > 5256,$$ So if $x^3 + y^3 = 5256$, then $x$ and $y$ are between $1$ and $17$. But you also know they are prime, so you have that $$x, y \in \{2, 3, 5, 7, 11, 13, 17\}.$$ We can then cube them to get $$x^3, y^3 \in \{8, 27, 125, 343, 1331, 2197, 4913\}. \tag{1}$$ Now we subtract each element from $5256$: $$5256 - x^3, 5256 - y^3 \in \{5248, 5229, 5131, 4913, 3925, 3059, 343\}. \tag{2}$$ Since $x^3 = 5256 - y^3$, $x^3$ is in BOTH the set (1) and the set (2). The intersection of these two sets is $\{343, 4913\} = \{7^3, 17^3\}$. So $x = 7$ or $x = 17$, and correspondingly, $y = 17$ or $y = 7$, respectively.