Math Olympiad Prime Number Question

One of the primes must be $19$, so WLOG $r=19$. Then $(p-1)(q-1)=20$. There aren't too many ways to factorise $20$...


Expanding on Ivan Loh's answer:

If $p$, $q$ and $r$ are prime numbers such that their product is $19$ times their sum, find $p^2$ + $q^2$ + $r^2$.

This expression can be written as: $pqr=19(p+q+r)$

As p, q, r are prime numbers, its product will just have p, q and r as prime divisors. Hence, one of them must be 19. Say $r=19$. Then, we have:

$pq19 = 19(p+q+19)$

$pq = p+q+19$

$pq-p-q = 19$ (*)

On the other hand, we always have the expression: $(p-1)(q-1) = pq-p-q+1$

which is equivalent to:

$(p-1)(q-1)-1 = pq-p-q$

Joining with (*)

$(p-1)(q-1)-1 = 19$

$(p-1)(q-1) = 20$

20 can be factorised in: $20=2*2*5$

in blocks of two:

$20=4 * 5$

or

$20=2 * 10$

or

$20=1 * 20$

so we have to options:

First

$p-1=4 -> p=5$

$q-1=5 -> q=6$

This cannot happen, because $p$, $q$, $r$ have to be prime and $p=6$ is not.

Second

$p-1=1 -> p=2$

$q-1=20 -> q=21$

This cannot happen, because $p$, $q$, $r$ have to be prime and $q=21$ is not.

Third

$p-1=2 -> p=3$

$q-1=10 -> q=11$

Both $p=3$ and $q=11$ are prime numbers, so we can go ahead. In such case,

$p^2 + q^2 + r^2 = 3^2 + 11^2 + 19^2 = 9 + 121 + 361 = 491$