This problem appears as the second question in the British Mathematical Olympiad 2014--2015 Round 1 paper (https://bmos.ukmt.org.uk/home/bmo1-2015.pdf).
Positive integers $p$, $a$ and $b$ satisfy the equation $p^2 + a^2 = b^2$. Prove that if $p$ is a prime greater than $3$, then $a$ is a multiple of $12$ and $2(p + a + 1)$ is a perfect square.
Using the difference of two squares, unique prime factorisation theorem and properties of the product of subsequent integers, I have managed to prove that $a$ is a multiple of 12 (i.e. that $a = 12q$ for $q \in \mathbb{N}$).
However, for the second part, I am not sure how to link the Pythagorean theorem to the required result, given that $a$ is a multiple of $12$. Since $2(p + a + 1)$ is even, then it is easy to deduce that we are looking for an expression for $t$ satisfying $p + a + 1 = 2t^2$.
Any clues/hints on tackling this problem would be greatly appreciated.
We have $p^2=b^2-a^2=(b-a)(b+a)$. Note that $p$ cannot divide both of $b-a$ and $b+a$. For if it did, then $p$ would divide both $a$ and $b$, and we would have $1^2+(a/p)^2=(b/p)^2$, which is impossible.
So we must have $b-a=1$ and $b+a=p^2$. It follows that $a=\frac{p^2-1}{2}$, and therefore $$2(p+a+1)=2p+p^2-1+2=(p+1)^2.$$