TITLE: Finding prime numbers equal to the sum of squared primes
QUESTION [6 upvotes]: I was doing some work on prime numbers, and I came across this problem:
"For prime numbers $p$ and $q$, determine the greatest prime, $r$ less than $100$ for which $r = p^2 + q^2$."
Of course, you can always do it by hand, but I was wondering, are there were any faster methods to solving it?
Thanks for any help.

REPLY [27 votes]: Note that if $p$ and $q$ are odd, then $p^2$ and $q^2$ are also. Then $p^2+q^2$ is even and can't be prime ($2$ can't be written as such a sum). Then necessarily $$r=4+q^2$$
With $r$ less than $100$ the only possible values for $q$ are the primes up to $10$.