Pattern for a function on roots of unities

40 Views Asked by At

Consider a prime $p$ (I am primarily concerned with $p$ such that $p\equiv 1$ mod 4, but I don't know if this condition is necessary) and the following construction of a function: pick any integer $k$ in $(\mathbb{Z}/p\mathbb{Z})^\times$ with order $\frac{p-1}{2}$, then abusing the notations, let $k,k^2,\cdots,k^{\frac{p-1}{2}-1}$ be the representatives in $(\mathbb{Z}/p\mathbb{Z})^\times$. Let $f(x)=x+x^k+x^{k^2}+\cdots+x^{k^{\frac{p-1}{2}-1}}$, but replacing any of the $k^n$ such that $k^n>\frac{p-1}{2}$ with $-(p-k^n)$. I wonder if there is any pattern or formula of $f(-1)$ for different $p$?

The construction might be unclear, so let me give an example. For p=13, then $f(x)=x+x^3+x^4+x^{-4}+x^{-3}+x^{-1}$ (here $k$ is 4, not 3). I don't know if there is an existing name for these functions, but how I came across this was I wanted to separate $p$-roots of unities : there will be only two images. The reason of the negative power is for other concerns.