I have noticed experimentally that the following question has a positive answer.


Let $p>5$ and $H$ be a subgroup of $(\mathbb Z/p\mathbb Z) ^\*$, with $a\in H$ and $a>2$.


Is it true that $$(a-1)\; | \; p\sum\limits\_{h \in H} (-h/p \mod a) ?$$



Strange result of divisibility
I assume that in the calculations, you are identifying the elements of $\mathbb Z/p\mathbb Z$ with $\{0,\dots,p-1\}\subseteq\mathbb Z$, and likewise, that the $\bmod a$ operation takes values in $\{0,\dots,a-1\}$. Then the result follows from



> 
> **Lemma:** If $a,b>0$ are coprime and $-a<h<b$, then $$a(ha^{-1}\bmod b)-b((-hb^{-1})\bmod a)=h.$$
> 
> 
> 


**Proof:** By negating $h$ and swapping the roles of $a$ and $b$ if necessary, we may assume $h\ge0$. Let $u=(ha^{-1}\bmod b)$. Then $au=h+bv$ for some $v$, and since $0\le au<ab$ and $0\le h<b$, we have $0\le v=\lfloor au/b\rfloor<a$. Also $bv\equiv-h\pmod a$, thus $v=((-hb^{-1})\bmod a)$. QED


Consequently,
$$\begin{align\*}
p\sum\_{h\in H}((-hp^{-1})\bmod a)
&=a\sum\_{h\in H}(ha^{-1}\bmod p)-\sum\_{h\in H}h\\
&=(a-1)\sum\_{h\in H}h,
\end{align\*}$$
as $\{ha^{-1}\bmod p:h\in H\}$ is just another enumeration of $H$.


