1. Let $a$ be a prime number, $b$ be a positive integer, and
$$
9(2 a+b)^{2}=509(4 a+511 b) \text {. }
$$

Find the values of $a$ and $b$.
$(2008$, National Junior High School Mathematics League)
Hint: Consider the original equation as a quadratic equation in $b$, whose discriminant is a perfect square, then $511^{2}-72 a$ is a perfect square.
Set $511^{2}-72 a=t^{2}(t \in \mathbf{N})$.
Since $(511-t)+(511+t)=1022$, thus, $511-t$ and $511+t$ have the same parity and are not simultaneously divisible by 3.
After discussion, we get $a=251, b=7$.