How to evaluate $\sum_{n=1}^{38}\sin\left(\frac{n^8\pi}{38}\right)$ [closed]

We have: $$\sum_{n=1}^{38}\sin\left(\frac{n^8 \pi}{38}\right) = \sum_{k=0}^{18}\sin\left((2k+1)^8 \frac{2\pi}{4\cdot 19}\right)+\sum_{k=0}^{18}\sin\left(2^6 k^8 \frac{2\pi}{19}\right),$$ where the first sum vanishes because $-2$ is a fourth power $\pmod{19}$, since $5^4+2\equiv0\pmod{19}$, while the second sum is just the imaginary part of a Gauss sum: $$\sum_{k=0}^{18}\sin\left(2^6 k^8\frac{2\pi}{19}\right)=\Im\sum_{m=0}^{18}\left(\frac{m}{q}\right)\exp\left(7\cdot\frac{2\pi i m}{19}\right)=\sqrt{19}$$ because the eighth powers $\pmod{19}$ are just the quadratic residues.


Again not a solution, but I noted that

$$ \left( \sum_{n=1}^{14} n^8 \mod (2 \times 14) \right) \mod (2 \times 14) = 7,\\ \sum_{n=1}^{14} \sin \left( \frac{\pi n^8}{14} \right) = \sqrt{7}. $$

$$ \left( \sum_{n=1}^{22} n^8 \mod (2 \times 22) \right) \mod (2 \times 22) = 11,\\ \sum_{n=1}^{22} \sin \left( \frac{\pi n^8}{22} \right) = \sqrt{11}. $$

$$ \left( \sum_{n=1}^{38} n^8 \mod (2 \times 38 ) \right) \mod (2 \times 38) = 19,\\ \sum_{n=1}^{38} \sin \left( \frac{\pi n^8}{38} \right) = \sqrt{19}. $$


And other strange things:

$$ \left( \sum_{n=1}^{10} n^2 \mod (2 \times 10) \right) \mod (2 \times 10) = 5,\\ \sum_{n=1}^{10} \sin \left( \frac{\pi n^2}{10} \right) = \sqrt{5}. $$

$$ \left( \sum_{n=1}^{14} n^2 \mod (2 \times 14) \right) \mod (2 \times 14) = 5,\\ \sum_{n=1}^{14} \sin \left( \frac{\pi n^2}{14} \right) = \sqrt{7}. $$

$$ \left( \sum_{n=1}^{22} n^2 \mod (2 \times 22) \right) \mod (2 \times 22) = 11,\\ \sum_{n=1}^{22} \sin \left( \frac{\pi n^2}{22} \right) = \sqrt{11}. $$

$$ \left( \sum_{n=1}^{26} n^2 \mod (2 \times 26) \right) \mod (2 \times 26) = 13,\\ \sum_{n=1}^{26} \sin \left( \frac{\pi n^2}{26} \right) = \sqrt{13}. $$


Let us write

$$ Q(p,q) = \left( \sum_{n=1}^{2p} n^q \mod (4p) \right) \mod (4p),\\ S(p,q) = \sum_{n=1}^{2p} \sin \left( \frac{\pi n^q}{2p} \right). $$

Then we find

$$ \begin{array}{cccc} p & q & Q(p,q) & S(p,q)\\ \hline 5 & 2 & 5 & \sqrt{5}\\ 7 & 2 & 7 & \sqrt{7}\\ 11 & 2 & 11 & \sqrt{11}\\ 13 & 2 & 13 & \sqrt{13}\\ 17 & 2 & 17 & \sqrt{17}\\ 19 & 2 & 19 & \sqrt{19}\\ 23 & 2 & \color{red}{21} & \sqrt{23}\\ \hline 7 & 4 & 7 & \sqrt{7}\\ 11 & 4 & 11 & \sqrt{11}\\ 38 & 4 & 19 & \sqrt{19}\\ \hline 7 & 8 & 7 & \sqrt{7}\\ 11 & 8 & 11 & \sqrt{11}\\ 38 & 8 & 19 & \sqrt{19}\\ \end{array} $$

Hope this gives some insight for others...


Not a solution, but I think this is the direction to investigate. First, let's consider instead the sum over complex exponentials (so that this particular sum will be the imaginary part). Then Mathematica gives the sum $$\sum_{n=1}^{38} \exp\left(\frac{i\pi n^8}{38}\right)=\sqrt{19}(1+i).$$ (As noted in comments, the same holds true if $38$ is replaced by some other even integers...but it's not clear which ones.)

This suggests that there's some rather generic result which we should be seeking. To approach this, note that for every eighth power we may write $n^8=76k+r$ for some integers $k,r$ with $r\in[0,76)$. Then $$ \exp\left(\frac{i \pi n^8}{38}\right)=\exp\left(2\pi k i+\frac{2\pi i r}{38}\right)=\exp\left(\frac{i\pi r}{38}\right)$$ which is a 76th root of unity.

So I think we in part need number-theoretic results: What can be said about $n^8$ for $n\in \mathbb{Z}/76\mathbb{Z}$?