This discrete sum was studied by Hausman and Shapiro [1]} and by Montgomery and Vaughan [2]}. These authors studied, more generally, the quantity
\( V_q(H):=\frac{1}{q} \sum _{i \in \mathbb {Z}/q\mathbb {Z}} \left( \sum _{\begin{array}{c}n=1\\ (n+i,q)=1\end{array}}^{H} 1 - H\frac{\phi (q)}{q}\right)^2\) 
