Evaluate $\prod_{p=1}^{\lfloor {n/2} \rfloor} \cos\left( \frac{\pi pk}{n} \right)$ with $k \in \mathbb{N}$

388 Views Asked by At

I have found similar cosine products, but mainly in the case when $k = 1$. I'm asking this since it is related to a question I asked which has led to this product:

$$S_{n,k} =\prod_{p=1}^{\lfloor {n/2} \rfloor} \cos\left( \frac{\pi p k}{n} \right)$$

Where both $k,n \in \mathbb{N}$.

I would do this problem for some time before asking but given how long the previous question has taken to get to this product, I would like ask for some help on how to evaluate it.


EDIT:

With some testing in Sage (to get an idea on what answer could look like):

If $n$ is odd: $$|S_{n,k}| = 2^{-((n-1)/2) + (\gcd(k,n)-1)/2}$$

If $n$ is even, let $n=2^\alpha n''$. Then:

$$|S_{n,k}| = \begin{cases} 0, & \text{if $\gcd(k, 2^\alpha) \neq 2^\alpha$} \\ 2^{-(n/2) + \gcd(k,n)/2}, & \text{otherwise} \end{cases}$$

Not sure how to find the sign of $S_{n,k}$ yet.