# What is the value of log_2(Pi_(m=1)^2017Pi_(n=1)^2017(1+e^((2 pi i n m)/2017))) ?

Sep 12, 2016

$4033$

#### Explanation:

We will show, more generally, that for and odd prime $p$,
${\log}_{2} \left({\prod}_{m = 1}^{p} {\prod}_{n = 1}^{p} \left(1 + {e}^{\frac{2 \pi i n m}{p}}\right)\right) = 2 p - 1$

Lemma: ${\prod}_{k = 1}^{\frac{p - 1}{2}} {\cos}^{2} \left(\frac{k \pi m}{p}\right) = \frac{1}{2} ^ \left(p - 1\right) , m \in {\mathbb{Z}}^{+}$

Proof: Using the identity $\sin \left(2 \theta\right) = 2 \sin \left(\theta\right) \cos \left(\theta\right)$, we have $\cos \left(\frac{k \pi m}{p}\right) = \sin \frac{\frac{2 k \pi m}{p}}{2 \sin \left(\frac{k \pi m}{p}\right)}$. Substituting, we get

${\prod}_{k = 1}^{\frac{p - 1}{2}} {\cos}^{2} \left(\frac{k \pi m}{p}\right) = {\prod}_{k = 1}^{\frac{p - 1}{2}} {\left(\sin \frac{\frac{2 k \pi m}{p}}{2 \sin \left(\frac{k \pi m}{p}\right)}\right)}^{2}$

$= \frac{1}{2} ^ \left(p - 1\right) {\left({\prod}_{k = 1}^{\frac{p - 1}{2}} \sin \frac{\frac{2 k \pi m}{p}}{\sin} \left(\frac{k \pi m}{p}\right)\right)}^{2}$

Note that $\sin \left(\frac{k \pi m}{p}\right) = {\left(- 1\right)}^{m - 1} \sin \left(\frac{\left(p - k\right) \pi m}{p}\right)$. Performing this substitution in the denominator of the above product for each odd $k$, we get, for some $l \in \mathbb{Z}$,

$\frac{1}{2} ^ \left(p - 1\right) {\left({\prod}_{k = 1}^{\frac{p - 1}{2}} \sin \frac{\frac{2 k \pi m}{p}}{\sin} \left(\frac{k \pi m}{p}\right)\right)}^{2} = \frac{1}{2} ^ \left(p - 1\right) {\left({\left(- 1\right)}^{l} {\prod}_{k = 1}^{\frac{p - 1}{2}} \sin \frac{\frac{2 k \pi m}{p}}{\sin} \left(\frac{2 k \pi m}{p}\right)\right)}^{2}$

$= \frac{1}{2} ^ \left(p - 1\right)$

Proceeding, we examine the product ${\prod}_{m = 1}^{p} {\prod}_{n = 1}^{p} \left(1 + {e}^{\frac{2 \pi i n m}{p}}\right)$. Note that ${e}^{\frac{2 \pi i n m}{p}} = 1$ if $n = p$ or $m = p$. Thus, for

$\left(m , n\right) \in \left\{\left(1 , p\right) , \left(2 , p\right) , \ldots , \left(p - 1 , p\right) , \left(p , 1\right) , \left(p , 2\right) , \ldots , \left(p , p\right)\right\}$

we have $1 + {e}^{\frac{2 \pi i n m}{p}} = 2$

As there are $2 p - 1$ elements of the above set, we may rewrite the product as

${\prod}_{m = 1}^{p} {\prod}_{n = 1}^{p} \left(1 + {e}^{\frac{2 \pi i n m}{p}}\right) = {2}^{2 p - 1} {\prod}_{m = 1}^{p - 1} {\prod}_{n = 1}^{p - 1} \left(1 + {e}^{\frac{2 \pi i n m}{p}}\right)$

Making the substitution ${e}^{\frac{2 \pi i m n}{p}} = {e}^{- 2 \pi i m} {e}^{\frac{2 \pi i m n}{p}} = {e}^{\frac{2 \pi i m \left(n - p\right)}{p}}$ for $n \ge \frac{p + 1}{2}$, we can rewrite the second product as

${\prod}_{n = 1}^{p - 1} \left(1 + {e}^{\frac{2 \pi i n m}{p}}\right) = {\prod}_{n = - \frac{p - 1}{2}}^{\frac{p - 1}{2}} \left(1 + {e}^{\frac{2 \pi i n m}{p}}\right)$

Pairing factors with corresponding positive and negative values of $n$, we find

$\left(1 + {e}^{\frac{2 \pi i m n}{p}}\right) \left(1 + {e}^{- \frac{2 \pi i m n}{p}}\right) = 2 + {e}^{\frac{2 \pi i m n}{p}} + {e}^{- \frac{2 \pi i m n}{p}}$

$= 2 + \left(\cos \left(\frac{2 \pi m n}{p}\right) + i \sin \left(\frac{2 \pi m n}{p}\right)\right) + \left(\cos \left(- \frac{2 \pi m n}{p}\right) + i \sin \left(- \frac{2 \pi m n}{p}\right)\right)$

$= 2 \left(1 + \cos \left(\frac{2 \pi m n}{p}\right)\right)$

$\implies {\prod}_{n = - \frac{p - 1}{2}}^{\frac{p - 1}{2}} \left(1 + {e}^{\frac{2 \pi i n m}{p}}\right) = {\prod}_{n = 1}^{\frac{p - 1}{2}} 2 \left(1 + \cos \left(\frac{2 \pi m n}{p}\right)\right)$

$= {2}^{\frac{p - 1}{2}} {\prod}_{n = 1}^{\frac{p - 1}{2}} \left(1 + \cos \left(\frac{2 \pi m n}{p}\right)\right)$

Using the identities ${\cos}^{2} \left(\theta\right) + {\sin}^{2} \left(\theta\right) = 1$ and $\cos \left(2 \theta\right) = {\cos}^{2} \left(\theta\right) - {\sin}^{2} \left(\theta\right)$, we find

$1 + \cos \left(2 \frac{\pi m n}{p}\right) = 2 {\cos}^{2} \left(\frac{\pi m n}{p}\right)$

$\implies {2}^{\frac{p - 1}{2}} {\prod}_{n = 1}^{\frac{p - 1}{2}} \left(1 + \cos \left(\frac{2 \pi m n}{p}\right)\right) = {2}^{p - 1} {\prod}_{n = 1}^{\frac{p - 1}{2}} {\cos}^{2} \left(\frac{\pi m n}{p}\right)$

$= {2}^{p - 1} \cdot \frac{1}{2} ^ \left(p - 1\right) \text{ }$ (by the lemma)

$= 1$

So ${\prod}_{n = 1}^{p - 1} \left(1 + {e}^{\frac{2 \pi i n m}{p}}\right) = 1$, meaning

${\prod}_{m = 1}^{p} {\prod}_{n = 1}^{p} \left(1 + {e}^{\frac{2 \pi i n m}{p}}\right) = {2}^{2 p - 1} {\prod}_{m = 1}^{p - 1} {\prod}_{n = 1}^{p - 1} \left(1 + {e}^{\frac{2 \pi i n m}{p}}\right)$

$= {2}^{2 p - 1} {\prod}_{m = 1}^{p - 1} 1$

$= {2}^{2 p - 1}$.

Thus ${\log}_{2} \left({\prod}_{m = 1}^{p} {\prod}_{n = 1}^{p} \left(1 + {e}^{\frac{2 \pi i n m}{p}}\right)\right) = {\log}_{2} \left({2}^{2 p - 1}\right) = 2 p - 1$

The answer to the question is a direct application of the above, substituting $p = 2017$ to arrive at the answer of $2 \left(2017\right) - 1 = 4033$

Sep 12, 2016

If $N$ is odd and prime then
${\log}_{2} \left({\Pi}_{m = 1}^{N} \left({\Pi}_{n = 1}^{N} \left(1 + {e}^{2 \pi i \frac{m n}{N}}\right)\right)\right) = 2 N - 1$

#### Explanation:

Analysing the unit roots

${z}^{N} - 1 = {\Pi}_{n = 1}^{N} \left(z - {e}^{2 \pi i \frac{n}{N}}\right)$

if $1 \le {m}_{0} \le N$

${z}^{N} - 1 = {\Pi}_{n = 1}^{N} \left(z - {e}^{2 \pi i \frac{{m}_{0} n}{N}}\right)$

because

$\left\{{e}^{2 \pi i {m}_{0} / N} , {e}^{2 \pi i \frac{2 {m}_{0}}{N}} , {e}^{2 \pi i \frac{3 {m}_{0}}{N}} , \cdots , {e}^{2 \pi i \frac{N {m}_{0}}{N}}\right\}$ is a rotation of
$\left\{{e}^{2 \pi i \frac{1}{N}} , {e}^{2 \pi i \frac{2}{N}} , {e}^{2 \pi i \frac{3}{N}} , \cdots , {e}^{2 \pi i}\right\}$

If $N$ is odd and prime, making $z = - 1$ and considering $1 \le {m}_{0} < N$

$- 1 - 1 = {\Pi}_{n = 1}^{N} \left(- 1 - {e}^{2 \pi i \frac{{m}_{0} n}{N}}\right)$ then

$2 = {\Pi}_{n = 1}^{N} \left(1 + {e}^{2 \pi i \frac{{m}_{0} n}{N}}\right)$ and for ${m}_{0} = N$

${\Pi}_{n = 1}^{N} \left(1 + {e}^{2 \pi i \frac{N n}{N}}\right) = {2}^{N}$ so

${\Pi}_{m = 1}^{N} \left({\Pi}_{n = 1}^{N} \left(1 + {e}^{2 \pi i \frac{m n}{N}}\right)\right) = {2}^{N - 1} {2}^{N} = {2}^{2 N - 1}$

Finally for $N$ prime

${\log}_{2} \left({\Pi}_{m = 1}^{N} \left({\Pi}_{n = 1}^{N} \left(1 + {e}^{2 \pi i \frac{m n}{N}}\right)\right)\right) = 2 N - 1$

Sep 13, 2016

$\frac{3025}{\log} 2$, after self-corrections, in three editions

#### Explanation:

Heralding the new year 2017, the design of the product is indeed

splendid.

Consider the variation in n, from 1 to 2017, in the inner product.

A typical factor is

$1 + {e}^{i \left(\frac{2 \pi m n}{2017}\right)}$

$= 1 + \cos \left(\frac{2 \pi m n}{2017}\right) + i \sin \left(\frac{2 \pi m n}{2017}\right)$

$= 2 {\cos}^{2} \left(\frac{\pi m n}{2017}\right) + i 2 \sin \left(\frac{\pi m n}{2017}\right) \cos \left(\frac{\pi m n}{2017}\right)$

$= 2 \cos \left(\frac{\pi m n}{2017}\right) \left(\cos \left(\frac{\pi m n}{2017}\right) + i \sin \left(\frac{\pi m n}{2017}\right)\right)$

$= 2 \cos \left(\frac{\pi m n}{2017}\right) {e}^{i \frac{\pi m n}{2017}}$

So the whole inner product is

${2}^{2017} \Pi \cos \left(\frac{\pi m n}{2017}\right) {e}^{i \frac{\pi m n}{2017}}$

$= {2}^{2017} \Pi \cos \left(\frac{\pi m n}{2017}\right) \Pi {e}^{i \frac{\pi m n}{2017}}$

$= {2}^{2017} \left(\Pi \cos \left(\frac{\pi m n}{2017}\right)\right) {e}^{i \frac{\pi m \left(1 + 2 + \ldots 2016 + 2017\right)}{2017}}$

$= {2}^{2017} {e}^{i m \pi \frac{\left(2017\right) \left(\frac{2018}{2}\right)}{2017}} \Pi \cos \left(\frac{\pi m n}{2017}\right)$

$= {2}^{2017} {e}^{i 1009 m \pi} \Pi \cos \left(\frac{\pi m n}{2017}\right)$

$= {\left(- 1\right)}^{m} {2}^{2017} \Pi \cos \left(\frac{\pi m n}{2017}\right)$, n varying from 1 to 2017

So, the given expression is

log_2(2^2017Pi((-1)^m(Picos((pimn)/2017)))

$= \frac{2017 + \sum {\left(- 1\right)}^{m} \sum \cos \left(\frac{\pi m n}{2017}\right)}{\log} 2$
using ${\log}_{2} = \log \frac{a}{\log} 2$

$= \frac{2017 + \sum {\left(- 1\right)}^{m} \sum \cos \left(\frac{\pi m n}{2017}\right)}{\log} 2$

$= \frac{2017 + \sum {\left(- 1\right)}^{m} \cos \left(\frac{\pi m n}{2017}\right)}{\log} 2$

For now, I break here.I hope that I could report my brief answer, a little later.

Using Lagrange's identity,

the inner $\sum \cos \left(\frac{m n \pi}{2017}\right)$

$= \frac{1}{2} \left(1 + \sin \frac{\left(2017 + \frac{1}{2}\right) m \frac{\pi}{2017}}{\sin} \left(\left(\frac{m \frac{\pi}{2}}{2017}\right)\right)\right)$

$= \frac{1}{2} \left(1 + \sin \frac{m \pi + \left(\frac{m \frac{\pi}{2}}{2017}\right)}{\sin} \left(\left(\frac{m \frac{\pi}{2}}{2017}\right)\right)\right)$

$= \frac{1}{2} \left(1 + {\left(- 1\right)}^{m}\right)$

= 1, when m is even, and 0, when m is odd.

$= \frac{3025}{\log} 2$