\(p+q=\left(p-q\right)^3\)
\(\Leftrightarrow2q=\left(p-q\right)\left[\left(p-q\right)^2-1\right]\)
\(\Leftrightarrow2q=\left(p-q\right)\left(p-q-1\right)\left(p-q+1\right)\)
TH 1: \(\left(p-q\right)⋮2\)
\(\Rightarrow p-q=2k\)
\(\Rightarrow q=k\left(p-q-1\right)\left(p-q+1\right)\)
Vì q nguyên tố nên \(\Rightarrow k=1\)
\(\Rightarrow\left\{{}\begin{matrix}p-q=2\\p+q=8\end{matrix}\right.\)
\(\Leftrightarrow\left\{{}\begin{matrix}p=5\\q=3\end{matrix}\right.\)
Tương tự cho trường hợp: \(\left\{{}\begin{matrix}p-q-1⋮2\\p-q+1⋮2\end{matrix}\right.\)