well so far it's looking a little more clear, no thoughts? it's hard to stay on topic when on topic gets null response $$\mathcal H={\{h_k}\}_{k=1..N} \subset \mathbb N \land N \gt 1$$
$$f(n,N)=\sum _{k=1}^{N} \operatorname{irem} \left( h_{{k}}-n+1,n \right)\tag{1a}$$
$$g(n,N)=\sum _{k=1}^{N}\operatorname{irem} \left( h_{{k}}-1,n \right)\tag{1b}$$
where $\operatorname{irem}(n,m)$ is the integer remainder of the division of $n$ by $m$.
$$\max(f(n,N),g(n,N))\equiv\min(f(n,N),g(n,N))\pmod 2\tag{2}$$