Find all triplet(s) (p, q, r) of prime numbers, that satisfy this equation:
p3 = p2 + q2 + r2
Justify your answer with valid reasoning.
Lets work mod 3 and split this into cases.
Case 1: none of p,q,r are congruent to 0 mod 3. Then the equation mod 3 reduces to +/-1 = 0. This is a contradiction, so no solutions here.
Case 2: all of p,q,r are congruent to 0 mod 3. Then needing all variables to be prime means the equation can only be 3^3 = 3^2 + 3^2 + 3^2. This checks out.
Case 3: two of p,q,r are congruent to 0 mod 3
Subcase 1: p=0 mod 3. Then without loss of generality let q=3; then 27 = 9 + 9 + r^2 but then r=3 which is the Case 2 solution
Subcase 2: q and r are 0 mod 3. Then p^3 = p^2 + 9 + 9. Then we have p^3 - p^2 - 18 = 0, but the one integer root is p=3, which again is already covered in Case 2.
Case 4: exactly one of p,q,r are congruent to 0 mod 3
Subcase 1: p=0 mod 3. Then 27 = 9 + q^2 + r^2, which then means 18 = q^2 + r^2. This is very easy to check that the only positive integer solution is again q=r=3
Subcase 2: without loss of generality q=3. Then p^3 = p^2 + r^2 + 9. Now we'll go mod 6. Then the equation reduces to +/1 = 4 +/- 1. This is a contradiction, so no solutions in this case.
That leaves us with exactly one triplet (p,q,r) of prime numbers that satisfy the given equation is (3,3,3).