4. Given that $a, b$ are integers, $a$ divided by 7 leaves a remainder of 3, and $b$ divided by 7 leaves a remainder of 5. When $a^{2}>4 b$, find the remainder when $a^{2}-4 b$ is divided by 7.
4. Slightly explained: Let $a=$
$$
7 m+3, b=7 n+5 \text {, }
$$

where $m, n$ are integers, then
$$
\begin{aligned}
a^{2}-4 b & =(7 m+3)^{2}-4(7 n+5) \\
& =7\left(7 m^{2}+6 m-4 n-2\right)+3 .
\end{aligned}
$$

Since $7 m^{2}+6 m-4 n-2$ is an integer,
thus $a^{2}-4 b$ leaves a remainder of 3 when divided by 7.