4. Find all pairs of prime numbers $p$ and $q$ for which

$$
p+q^{2}=q+145 p^{2} \text {. }
$$

The regional round of category C takes place

on Tuesday, March 21, 2006

so that it starts in the morning and the contestants have 4 hours of pure time to solve the problems. For each problem, a contestant can earn 6 points, and a successful solver is a student who scores 10 points or more. Allowed aids are writing and drawing supplies, school MF tables, and calculators without a graphic display. These details will be communicated to the students before the start of the competition.
For prime numbers $p, q$ it must hold that $q(q-1)=p(145 p-1)$, so the prime number $p$ divides $q(q-1)$. The prime number $p$ cannot divide the prime number $q$, because that would mean $p=q$, and thus $145 p=p$, which is impossible. Therefore, $p$ divides $q-1$, i.e., $q-1=k p$ for some natural number $k$. Substituting this into the given relation, we get the condition

$$
p=\frac{k+1}{145-k^{2}}.
$$

We see that the denominator of the fraction on the right-hand side is positive only for $k \leq 12$, but for $k \leq 11$ its numerator is smaller than the denominator: $k+1 \leq 12 < 24 \leq 145-k^{2}$. Only for $k=12$ does $p$ turn out to be a natural number and a prime, $p=13$. Then $q=157$, which is also a prime number. The problem has a unique solution.

For a complete solution, award 6 points, of which 4 points for the consideration of divisibility leading to the relation $q=1+k p$.