6

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.

  • 1
    You can take a look at https://en.wikipedia.org/wiki/Chebyshev_polynomials (you are multiplying the roots of a Chebyshev polynomial, essentially, so $|S_{n,k}|$ is the square root of its constant term, up to something). If $n$ is prime, it seems Gauss' lemma shows that the sign of $S_{n,k}$ is the Legendre symbol $\left(\frac kn \right)$ times something that depends on the constant term of the Chebyshev polynomial, like $(-1)^n$: https://en.wikipedia.org/wiki/Gauss%27s_lemma_(number_theory) – Bart Michels Aug 15 '18 at 17:51

1 Answers1

5

Here is my attempt. This is motivated by Jack D'Aurizio's trick os using Fourier series expansion of $\log\cos(x)$. I need some more eyes to go through and see if I made any mistakes. Please feel free to edit/fix/add if you find it helpful.

\begin{eqnarray*} \log \cos(x) &=& \log \frac{1}{2} -\sum_{m\ge 1}^{\infty}{\frac{(-1)^{m} \cos(2 m x)}{m}} \end{eqnarray*}

\begin{eqnarray*} \sum_{k=1}^{\left\lfloor \frac{n}{2}\right\rfloor}{\cos \frac{2\pi p k}{n}} &=& \begin{cases} -\frac{1}{2}, & mod(n,p) \ne 0 \\ \left \lfloor \frac{n}{2} \right\rfloor, & mod(n,p) =0 \end{cases} \end{eqnarray*}

Generically,

\begin{eqnarray*} \sum_{k=1}^{\left\lfloor \frac{n}{2}\right\rfloor}{\cos \frac{2\pi p k}{n}} &=& -\frac{1}{2} \left[1-\frac{\sin\left(\pi p \frac{1+2\left\lfloor \frac{n}{2}\right\rfloor}{n}\right)}{\sin \frac{\pi p}{n}} \right] \\ &=& \begin{cases} \frac{n-1}{2} , & mod(p,n) = 0, n, odd \\ -\frac{1}{2} , & mod(p,n) \ne 0, n, odd \\ -\frac{1}{2} \left[1-(-1)^{p}\right], & n, even\end{cases} \\ &=& \begin{cases} \left\lfloor\frac{n}{2}\right\rfloor , & mod(p,n) = 0, n, odd \\ -\frac{1}{2} , & mod(p,n) \ne 0, n, odd \\ -1, & n, even, p, odd \\ 0, & n, even, p, even \end{cases} \end{eqnarray*}

Note that,

\begin{eqnarray*} \frac{1+2\left\lfloor \frac{n}{2}\right\rfloor}{n} &=& \begin{cases} 1, & n, odd \\ 1+\frac{1}{n}, & n, even \end{cases} \\ \sin\left(\pi p \frac{1+2\left\lfloor \frac{n}{2}\right\rfloor}{n}\right) &=& \begin{cases} 0, & n, odd \\ (-1)^{p}\sin \frac{\pi p}{n}, & n, even \end{cases} \\ \end{eqnarray*}

For $x=\frac{\pi p k}{n}$,

\begin{eqnarray*} \sum_{k=1}^{\left\lfloor \frac{n}{2}\right\rfloor} \sum_{m\ge 1}^{\infty}{\frac{(-1)^{m} \cos \left(\frac{2 \pi p k m}{n}\right)}{m}} &=& \sum_{m\ge 1}^{\infty} \sum_{k=1}^{\left\lfloor \frac{n}{2}\right\rfloor}{\frac{(-1)^{m} \cos \left(\frac{2 \pi p k m}{n}\right)}{m}} \\ &=& \sum_{\underset{m\ge 1}{m \ne \frac{n}{(n,p)} \mathbb{Z} }}^{\infty} \sum_{k=1}^{\left\lfloor \frac{n}{2}\right\rfloor}{\frac{(-1)^{m} \cos \left(\frac{2 \pi p k m}{n}\right)}{m}} + \sum_{\underset{m\ge 1}{m = \frac{n}{(n,p)} \mathbb{Z} }}^{\infty} \sum_{k=1}^{\left\lfloor \frac{n}{2}\right\rfloor}{\frac{(-1)^{m} \cos \left(\frac{2 \pi p k m}{n}\right)}{m}} \\ &=& \sum_{\underset{m\ge 1}{m \ne \frac{n}{(n,p)} \mathbb{Z} }}^{\infty} \frac{(-1)^{m}}{m} \sum_{k=1}^{\left\lfloor \frac{n}{2}\right\rfloor}{ \cos \left(\frac{2 \pi p k m}{n}\right)} + \sum_{\underset{m\ge 1}{m = \frac{n}{(n,p)} \mathbb{Z} }}^{\infty} \frac{(-1)^{m}}{m} \sum_{k=1}^{\left\lfloor \frac{n}{2}\right\rfloor}{ \cos \left(\frac{2 \pi p k m}{n}\right)} \\ &=& \sum_{\underset{m\ge 1}{m \ne \frac{n}{(n,p)} \mathbb{Z} }}^{\infty} \frac{(-1)^{m}}{m} \left(-\frac{1}{2}\right) + \sum_{\underset{m\ge 1}{m = \frac{n}{(n,p)} \mathbb{Z} }}^{\infty} \frac{(-1)^{m}}{m} \left\lfloor \frac{n}{2}\right\rfloor \\ &=& \sum_{m\ne N_{p}}^{\infty} \frac{(-1)^{m}}{m} \left(-\frac{1}{2}\right) + \sum_{m= i N_{p},\forall i}^{\infty} \frac{(-1)^{m}}{m} \left\lfloor \frac{n}{2}\right\rfloor \\ &=& \sum_{m\ne N_{p}}^{\infty} \frac{(-1)^{m}}{m} \left(-\frac{1}{2}\right) + \sum_{i=1}^{\infty} \frac{(-1)^{ i N_{p}}}{ i N_{p}} \left\lfloor \frac{n}{2}\right\rfloor \\ &=& -\frac{1}{2} \sum_{m=1}^{\infty} \frac{(-1)^{m}}{m} + \frac{1}{2} \sum_{i=1}^{\infty} \frac{(-1)^{ i N_{p}}}{ i N_{p}} \left(1+2 \left\lfloor \frac{n}{2}\right\rfloor\right) \end{eqnarray*}

Here $N_p \triangleq \frac{n}{gcd(n,p)}$.

For even $N_p$, the harmonic series diverges. The only interesting case is $N_p$ being odd. In which case,'

\begin{eqnarray*} &=&-\frac{1}{2}\sum_{m=1}^{\infty} \frac{(-1)^{m}}{m} + \frac{1}{2} \sum_{m=1}^{\infty} \frac{(-1)^{ m N_{p}}}{ m N_{p}} \left(1+2 \left\lfloor \frac{n}{2}\right\rfloor\right) \\ &=&\frac{1}{2} \sum_{m=1}^{\infty} \frac{(-1)^{ m}}{ i} \left(\frac{1+2 \left\lfloor \frac{n}{2}\right\rfloor}{N_p} -1\right) \\ &=&\frac{1}{2} \left(\frac{1+2 \left\lfloor \frac{n}{2}\right\rfloor}{N_p} -1\right) \sum_{m=1}^{\infty} \frac{(-1)^{ m}}{ i} \\ &=&\frac{1}{2} \left(\frac{1+2 \left\lfloor \frac{n}{2}\right\rfloor}{N_p} -1\right) \log(2). \end{eqnarray*}

\begin{eqnarray*} \sum_{k=1}^{\left\lfloor \frac{n}{2}\right\rfloor}{\log \cos\left(\frac{\pi p k}{n}\right)} &=& \sum_{k=1}^{\left\lfloor \frac{n}{2}\right\rfloor} \log \frac{1}{2} - \sum_{k=1}^{\left\lfloor \frac{n}{2}\right\rfloor} \sum_{m\ge 1}^{\infty}{\frac{(-1)^{m} \cos\left(\frac{2\pi p k m}{n}\right)}{m}} \\ &=& \left\lfloor \frac{n}{2}\right\rfloor \log \frac{1}{2} - \sum_{k=1}^{\left\lfloor \frac{n}{2}\right\rfloor} \sum_{m\ge 1}^{\infty}{\frac{(-1)^{m} \cos\left(\frac{2\pi p k m}{n}\right)}{m}} \\ &=& \left\lfloor \frac{n}{2}\right\rfloor \log \frac{1}{2} - \frac{1}{2} \left(\frac{1+2 \left\lfloor \frac{n}{2}\right\rfloor}{N_p} -1\right) \log(2) \\ &=& \left\lfloor \frac{n}{2}\right\rfloor \log \frac{1}{2} + \frac{1}{2} \left(\frac{1+2 \left\lfloor \frac{n}{2}\right\rfloor}{N_p} -1\right) \log \frac{1}{2} \\ &=& \frac{1}{2} \left(2 \left\lfloor \frac{n}{2}\right\rfloor+\frac{1+2 \left\lfloor \frac{n}{2}\right\rfloor}{N_p} -1\right) \log \frac{1}{2} \\ &=& \log \left[\frac{1}{2^{ \left( \left\lfloor \frac{n}{2}\right\rfloor+\frac{1+2 \left\lfloor \frac{n}{2}\right\rfloor}{2 N_p} -\frac{1}{2}\right)}} \right] \end{eqnarray*}

Looking at the exponent, \begin{eqnarray*} \prod_{k=1}^{\left\lfloor \frac{n}{2}\right\rfloor}{\cos\left(\frac{\pi p k}{n}\right)} &=& 2^{- \left( \left\lfloor \frac{n}{2}\right\rfloor+\frac{1+2 \left\lfloor \frac{n}{2}\right\rfloor}{2 N_p} -\frac{1}{2}\right)} \\ &=& 2^{- \left( \left\lfloor \frac{n}{2}\right\rfloor+\frac{1+2 \left\lfloor \frac{n}{2}\right\rfloor}{2 \frac{n}{gcd(n,p)}} -\frac{1}{2}\right)}. \end{eqnarray*}

A special case is when $p=1$ and $n$, $N_p=n/gcd(n,p)=n$, it becomes $2^{-n}$, the well known formula linked above.

Nivedita Rethnakar
  • 1,370
  • 7
  • 11
  • Appreciate the answer and don't have the time to read the complete answer, but with some number checking if $p=6$ and $n=15$ then the product is $-1/64$, but your result yields $1/256$. – user246678 Aug 17 '18 at 09:45