Suppose $S \subseteq \mathbb{N}$ is a set of natural numbers (not including $0$).
Define $$S_{*} := \{s^2+t^2: s,t \in S\}$$
so that $S_{*}$ contains positive integers that are sums of two squares, where the square root of each such square belongs to $S$.
Do we have the following criteria;
$$\sum_{s \in S}\frac{1}{s} = \infty \Leftrightarrow \sum_{s \in S_{*}}\frac{1}{s} = \infty ?$$
$\textbf{Example:}$
If $S = \mathbb{N}$ the above logical identity holds as $\sum_{s \in S}\frac{1}{s} = \infty$ and $\sum_{s \in S_{*}}\frac{1}{s} > \sum_{p \text{ is prime and }1\mod 4} \frac{1}{p} = \infty$
The answer is no, and $P=\{$all primes$\}$ provides a tidy counterexample: we know that $\sum_{p\in P} \frac1p$ diverges. However, given any $U\ge1$, the number of integers in $[U,2U)$ that are the sum of two squares of primes is at most $\pi(\sqrt{2U})^2$, since both primes must be less than $\sqrt{2U}$ individually; and $$ \pi(\sqrt{2U})^2 \ll \biggl( \dfrac{\sqrt{2U}}{\log\sqrt{2U}} \biggr)^2 \ll \dfrac U{\log^2 U} $$ by Chebyshev's bounds or the prime number theorem (where $\ll f(U)$ means $<Cf(U)$ for some constant $C$). Therefore $$ \sum_{n\in P_*} \frac1n = \sum_{k=2}^\infty \sum_{\substack{2^k\le n<2^{k+1} \\ n\in P_*}} \frac1n \ll \sum_{k=2}^\infty \dfrac{2^k}{\log^2(2^k)} \frac1{2^k} = \frac1{\log^22} \sum_{k=2}^\infty \frac1{k^2} \ll 1 $$ converges. (The primes weren't special: any sequence that grows like $n(\log n)^\alpha$ with $\frac12<\alpha\le1$ would work just as well.)
The other implication does hold, since $s^2+t^2 \ge 2st$ and therefore $$ \sum_{n\in S_*} \frac1n \le \sum_{s,t\in S} \frac1{s^2+t^2} \le \sum_{s,t\in S} \frac1{2st} = \frac12 \biggl( \sum_{s\in S} \frac1s \biggr)^2. $$