<s>[INST] "reverse" diophantine equation Suppose we define $A= (8+\sqrt{x})^{1/3} + (8-\sqrt{x})^{1/3}$. How can we find, algebraically, all values of x for which $A$ is an integer?
I was not able this problem save for with Mathematica. How can we solve this using the tool of our brains?
 [/INST] $A^3 = 16+3A\sqrt[3]{64-x}$, or $A^3 = 16+3Ay$, where $y=\sqrt[3]{64-x}$.
For each $A \ne 0$ we have $y=\frac{A^3-16}{3A}$, and $x=64-y^3$.
If $A\in (0,4]$, then  $x\ge 0$.
If $A\in (4,\infty)$, then  $x<0$, so $\sqrt{x}$ will be imaginary.
(if $A<0$, then we have no solutions, because RHS of your formula has $Re > 0$. (?))
Writing by one row, we have 
$$x=64-\left(\frac{A^3-16}{3A}\right)^3.$$
\begin{array}{|l|l|}
A & x \\
--- & --- \\
1 & 189 \\
2 & 1792/3^3 \\
3 & 45325/3^6 \\
4 & 0 \\
5 & -1079029/(3\cdot 5)^3 \\
6 & -7626752/(3\cdot 6)^3 \\
7 & -34373079/(3\cdot 7)^3 \\
8 & -236600/3^3 \\
9 & -361207385/(3\cdot 9)^3 \\
\cdots & \cdots
\end{array}
</s>