4. Let positive integers $a, b$ make $15a + 16b$ and $16a - 15b$ both squares of positive integers. Find the smallest value that the smaller of these two squares can take.
Let positive integers $a, b$ be such that $15a + 16b$ and $16a - 15b$ are both squares of positive integers, i.e.,
$$
15a + 16b = r^2, \quad 16a - 15b = s^2 \quad (r, s \in \mathbb{N}).
$$
$$
\text{Thus, } 15^2 a + 16^2 a = 15r^2 + 16s^2,
$$

i.e., $481a = 15r^2 + 16s^2$;
$$
16^2 b + 15^2 b = 16r^2 - 15s^2,
$$

i.e., $481b = 16r^2 - 15s^2$.
Therefore, $15r^2 + 16s^2$ and $16r^2 - 15s^2$ are both multiples of 481. We will prove that $r$ and $s$ are both multiples of 481.

Since $481 = 13 \times 37$, it suffices to prove that $r$ and $s$ are both multiples of 13 and 37.
First, we prove that $r$ and $s$ are both multiples of 13 by contradiction.
Since $16r^2 - 15s^2$ is a multiple of 13, then $13 \nmid r + 13 \nmid s$.
Because $16r^2 \equiv 15s^2 \pmod{13}$. So,
$16r^2 \cdot s^{10} \equiv 15s^{12} \equiv 15 \equiv 2 \pmod{13}$.
Since the left side is a perfect square, taking the sixth power on both sides, we have $\left(\left(4rs^5\right)^2\right)^6 \equiv 1 \pmod{13}$,

thus $2^6 = 1 \pmod{13}$, which is a contradiction.
Next, we prove that $37 \mid r$ and $37 \mid s$ by contradiction.
Assume $37 \nmid r$ and $37 \nmid s$.
Since $37 \mid 15r^2 + 16s^2$ and $37 \mid 16r^2 - 15s^2$, we have
$37 \mid r^2 - 31s^2$, i.e., $r^2 \equiv 31s^2 \pmod{37}$.
Therefore, $r^2 s^{34} = 31s^{36} = 31 \pmod{37}$.
$31^{14} = 1 \pmod{37}$.

But $21^2 \equiv (31^2)^9 \equiv ((-6)^2)^9 \equiv 36^9 \equiv (-1)^9 \equiv -1 \pmod{37}$, which is a contradiction.
Thus, $481 \mid r$ and $481 \mid s$. Clearly, these two perfect squares are both at least $481^2$.

On the other hand, when $a = 481 \times 31$ and $b = 481$, both perfect squares are $481^2$. Therefore, the minimum value sought is $481^2$.