4. If $100a+64$ and $201a+64$ are both four-digit numbers, and both are perfect squares, then the value of the integer $a$ is
4.17.

Let $100 a+64=m^{2}, 201 a+64=n^{2}$, then
$$
32 \leqslant m, n<100 \text {. }
$$

Subtracting the two equations gives
$$
101 a=n^{2}-m^{2}=(n+m)(n-m) \text {. }
$$

Since 101 is a prime number, and $-101<n-m<101, 0<n$ $+m<200$, so, $n+m=101$.
Thus, $a=n-m=2 n-101$.
Substituting $a=2 n-101$ into $201 a+64=n^{2}$, and simplifying gives
$$
n^{2}-402 n+20237=0 \text {. }
$$

Solving for $n$ yields $n=59$ or $n=343$ (discard $n=343$).
Therefore, $a=2 n-101=17$.