3. Call a lattice point visible if the line segment connecting the point and the origin does not pass through another lattice point. Given a positive integer $k$, denote by $S_{k}$ the set of all visible lattice points $(x, y)$ such that $x^{2}+y^{2}=k^{2}$. Let $D$ denote the set of all positive divisors of $2021 \cdot 2025$. Compute the sum
$$
\sum_{d \in D}\left|S_{d}\right|
$$

Here, a lattice point is a point $(x, y)$ on the plane where both $x$ and $y$ are integers, and $|A|$ denotes the number of elements of the set $A$.
Solution. We claim that the required sum is 20 .
Let $T_{k}$ denote the set of all lattice points in the circle $x^{2}+y^{2}=k^{2}$. We claim that $\sum_{d \mid k}\left|S_{d}\right|=\left|T_{k}\right|$. Indeed, given a point $(x, y)$ in $T_{k}$, let $g=\operatorname{gcd}(x, y)$. Then $x / g, y / g$ are necessarily coprime, and hence $(x / g, y / g)$ visible, and $(x / g)^{2}+(y / g)^{2}=(k / g)^{2}$. This implies $(x / g, y / g) \in \bigcup_{d \mid k} S_{d}$. Next, note that the $S_{d}$ 's are necessarily disjoint. Now if $\left(x^{\prime}, y^{\prime}\right)$ is a visible lattice point in $S_{d}$ where $d \mid k$, then we can write $k=g d$ so that $(x, y)=\left(g x^{\prime}, g y^{\prime}\right)$ is a lattice point in $T_{k}$. This establishes a bijection between $\bigcup_{d \mid k} S_{d}$ and $T_{k}$, and since the $S_{d}$ 's are disjoint, the claim follows.
From the claim, it suffices to find the number of lattice points in the circle $x^{2}+y^{2}=$ $(2021 \cdot 2025)^{2}$. This is equivalent to
$$
x^{2}+y^{2}=3^{8} \cdot 5^{4} \cdot 43^{2} \cdot 47^{2} .
$$

Now it is well-known that if $x^{2}+y^{2} \equiv 0(\bmod p)$ where $p \equiv 3(\bmod 4)$ is a prime, then $x \equiv y \equiv 0(\bmod p)$. Thus, we must also have $x, y \equiv 0\left(\bmod 3^{4} \cdot 43 \cdot 47\right)$. It then follows that the number of lattice points is the same as the number of lattice points in $x^{2}+y^{2}=25^{2}$.
If $x=0$ or $y=0$, there are 4 solutions. Otherwise, assume WLOG that they are both positive. Now it is well-known that all solutions to $x^{2}+y^{2}=z^{2}$ are in the form $x=g\left(m^{2}-n^{2}\right), y=2 g m n$, and $z=g\left(m^{2}+n^{2}\right)$, where $m>n$ are coprime positive integers, and $g$ is a positive integer. Thus, we want $g\left(m^{2}+n^{2}\right)=25$. Note that $g \mid 25$, so $g=1,5,25$.
If $g=25$, then $m^{2}+n^{2}=1$, so $n=0$, contradiction. If $g=5$, then $m^{2}+n^{2}=5$, which yields $m=2$ and $n=1$ and thus $g\left(m^{2}-n^{2}\right)=15$ and $2 g m n=20$, so $(x, y)=$ $(15,20),(20,15)$. If $g=1$, then we get $m^{2}+n^{2}=25$, from which we obtain $m=4$ and $n=3$. It then follows that $(x, y)=(24,7),(7,24)$, and so we have 2 solutions when $x, y$ are both positive. This implies that there are $4 \cdot 4=16$ solutions when $x, y$ are nonzero, and so there are $4+16=20$ solutions in total.