I have a number theory situation that I hope someone will recognize as a known situation and can direct me to some relevant papers in the literature.
Let $S_1$ be an infinite subset of $N_0 =\{0,1,2,3,...\}$.
Let $S_2 = N_0\setminus S_1$ (complement of $S_1$ in $N_0$, also infinite).
Let $S^*$ be a third set of positive integers, possibly sparse, such as $\{n^2|n\geq 1\}$ or $\{n^2|n\geq 1\}\cup \{2n^2|n\geq 1\}$.
Let $n_2$ be an arbitrary element of $S_2$.
It seems that for certain choices of $S_1$ (and thus $S_2$) and $S^*$ that the number of solutions to the equation $n_1+n^* = n_2, n_1 \in S_1, n^* \in S^*$, is always even.
As an example, take $S_1=\{n(3n+1)/2|n\in \mathbb{Z}\}$ and $S^*=\{n^2|n\geq 1\}\cup \{2n^2|n\geq 1\}$. So $S_1=\{\dots, 287, 247, 210, 176, 145, 117, 92, 70, 51, 35, 22, 12, 5, 1, 0, 2, 7, 15, 26, 40, 57, 77, 100, 126, 155, 187, 222, 260, 301, \dots \}$ and $S^*=\{1, 2, 4, 8, 9, 16, 18, 25, 32, 36, 49, 50, 64, 72, 81, 98, 100, 121, 128, 144, 162, 169, 196, 200, 225, 242, 256, 288,\dots \}$.
Consider $n_2=226\in S_2$. The list of solutions $(n_1,n^*)$ to $n_1+n^* = n_2, n_1 \in S_1, n^* \in S^*$ is $\{(222, 4), (210, 16), (145, 81), (126, 100), (57, 169), (1, 225), (176, 50), (26, 200) \}$.
It can be seen that he number of solutions is 8 (even).
I am not asking for a proof for this particular case (it is not that hard). Instead, I am asking anyone knows of other papers about this phenomenon?
Does this situation ring any bells for anyone? If so, I would appreciate any pointers to relevant papers in the literature. This may be something well known in, say, additive number theory, but that is not an area that I know to any great extent.
Someone I was in grad school with pointed out this paper to me, which is about the topic I discussed above: https://arxiv.org/abs/math/0506496