# Primes $p_i$ such that $\sin(\frac{\pi}{n})\sin(\frac{p_1\pi}{n})\cdots\sin(\frac{p_k\pi}{n})$ is rational

The following amazing identity can be checked directly by hand. $$\sin\left(\frac{\pi}{30}\right)\sin\left(\frac{7\pi}{30}\right)\sin\left(\frac{11\pi}{30}\right)\sin\left(\frac{13\pi}{30}\right)\sin\left(\frac{17\pi}{30}\right)\sin\left(\frac{19\pi}{30}\right)\sin\left(\frac{23\pi}{30}\right)\sin\left(\frac{29\pi}{30}\right) = \frac{1}{2^8}$$ This makes me wonder:

Question. Can we find arbitrarily long sequences of prime numbers $p_1<p_2<\cdots<p_k$ such that the product $$\sin\left(\frac{\pi}{n}\right)\sin\left(\frac{p_1\pi}{n}\right)\sin\left(\frac{p_2\pi}{n}\right)\cdots\sin\left(\frac{p_k\pi}{n}\right)$$ is rational for some integer $n>p_k$.

Other examples are: \begin{align} \sin\left(\frac{\pi}{4}\right)\sin\left(\frac{3\pi}{4}\right) &= \frac{1}{2} \\ \sin\left(\frac{\pi}{6}\right)\sin\left(\frac{3\pi}{6}\right)\sin\left(\frac{5\pi}{6}\right) &= \frac{1}{2^2} \\ \sin\left(\frac{\pi}{8}\right)\sin\left(\frac{3\pi}{8}\right)\sin\left(\frac{5\pi}{8}\right)\sin\left(\frac{7\pi}{8}\right) &= \frac{1}{2^3} \\ \sin\left(\frac{\pi}{12}\right)\sin\left(\frac{2\pi}{12}\right)\sin\left(\frac{5\pi}{12}\right)\sin\left(\frac{7\pi}{12}\right)\sin\left(\frac{11\pi}{12}\right) &= \frac{1}{2^5} \\ \sin\left(\frac{\pi}{18}\right)\sin\left(\frac{5\pi}{18}\right)\sin\left(\frac{7\pi}{18}\right)\sin\left(\frac{11\pi}{18}\right)\sin\left(\frac{13\pi}{18}\right)\sin\left(\frac{17\pi}{18}\right) &= \frac{1}{2^6} \\ \sin\left(\frac{\pi}{18}\right)\sin\left(\frac{3\pi}{18}\right)\sin\left(\frac{5\pi}{18}\right)\sin\left(\frac{7\pi}{18}\right)\sin\left(\frac{11\pi}{18}\right)\sin\left(\frac{13\pi}{18}\right)\sin\left(\frac{17\pi}{18}\right) &= \frac{1}{2^7} \\ \sin\left(\frac{\pi}{30}\right)\sin\left(\frac{7\pi}{30}\right)\sin\left(\frac{11\pi}{30}\right)\sin\left(\frac{13\pi}{30}\right)\sin\left(\frac{17\pi}{30}\right)\sin\left(\frac{19\pi}{30}\right)\sin\left(\frac{23\pi}{30}\right)\sin\left(\frac{29\pi}{30}\right) &= \frac{1}{2^8} \\ \sin\left(\frac{\pi}{30}\right)\sin\left(\frac{5\pi}{30}\right)\sin\left(\frac{7\pi}{30}\right)\sin\left(\frac{11\pi}{30}\right)\sin\left(\frac{13\pi}{30}\right)\sin\left(\frac{17\pi}{30}\right)\sin\left(\frac{19\pi}{30}\right)\sin\left(\frac{23\pi}{30}\right)\sin\left(\frac{29\pi}{30}\right) &= \frac{1}{2^9} \end{align} The longest I found is $$\sin\left(\frac{\pi}{38}\right)\sin\left(\frac{3\pi}{38}\right)\sin\left(\frac{5\pi}{38}\right)\sin\left(\frac{7\pi}{38}\right)\sin\left(\frac{11\pi}{38}\right)\sin\left(\frac{13\pi}{38}\right)\sin\left(\frac{17\pi}{38}\right)\sin\left(\frac{19\pi}{38}\right)\sin\left(\frac{23\pi}{38}\right)\sin\left(\frac{29\pi}{38}\right) = \frac{1}{2^9}$$ Note that it breaks the pattern of $n=p_k+1$. Note also that not all examples have consecutive primes.

• Something to begin with $$\prod\limits_{k = 1}^{n - 1} \sin \dfrac{k\pi}{n} = \dfrac{n}{2^{n - 1}}$$ May 12, 2018 at 14:35

Consider a product: $$\prod_{m_i}^{}2\sin\frac{\pi m_i}{n},$$ where $m_i$ are integer numbers: $$0< m_1< m_2<\cdots < m_N< n.$$ Obviously the number of multiplyers $N<n$. As all multipliers are algebraic integers the product is rational if and only if it is integer.

This particularly happens if $m_i$ is a set of numbers coprime to $n$: $\gcd(m_i,n)=1$. It holds: $$P_n:=\prod_{m_i}^{\gcd(m_i,n)=1}2\sin\frac{\pi m_i}{n}= \begin{cases} 1,& n\ne p^k\\ p,& n=p^k \end{cases},\tag{1}$$ where $p$ is a prime number, and $k$ is a positive integer. The expression (1) can be proved similarly to the result cited in a comment above, using cyclotomic polynomials $\Phi_n(z)$ instead of $\frac{z^n-1}{z-1}$.

Let $\cal D_n$ be a set (not necessary complete) of distinct divisors of $n$ (excluding $1$) and let $l_i$ be the count of prime powers $p_i^k$ in the set. Then $$\prod_{d\in\cal D_n} P_d=\prod_i p_i^{l_i}.\tag{2}$$ Particularly for set $\cal D^*_n$ containing all prime powers dividing $n$ one obtains: $$\prod_{d\in\cal D^*_n} P_d=n.\tag{3}$$ The expression mentioned in the comment above represent a particular case of (3).

Observe the special cases $n=2$ and $n=6$. They are exceptional as not only the product but also the multipliers themselves are integer. It particularly allows to multiply the expression by $P'_6=2\sin\frac{\pi}{6}$ alone. Quite generally if RHS of (2) is a perfect square one can use only half of sines picking up one from the pair $(\sin\frac{\pi m_i}{n},\sin\frac{\pi (n-m_i)}{n})$ to obtain still integer result. We denote this case as $\sqrt{P_n}$. In this sense $P'_6\equiv\sqrt{P_6}$.

In LHS of (2) we assume that the arguments of sines are reduced to common denominator $n$. The corresponding numerators are therefore $\displaystyle m_i\equiv m_i^{(n)}=m_i^{(d)}\frac{n}{d}$. It follows that if $m_i$ are required to be prime or 1 the simplest possible combinations are $$P_n, \sqrt{P_n},\tag{4}$$ where the latter form can be used only if $n$ is not a prime power. If $n=2p$ or $n=6p$ with $p$ being a prime the expressions (4) can be multiplied additionally by $P_2$ or $P'_6$, respectively.

And indeed all examples given in question are of the form (4). In the same order as they appear in question, the LHS can be symbolically represented as: $$P_4, P_6P_2, P_8, P_{12}P'_6, P_{18}, P_{18}P'_6, P_{30}P'_6, \sqrt{P_{38}} P_2.$$

The reason for your equalities can be seen in the fact that the sets of $m_i$ coprime to given $n$ consist in all cases except for the last one exclusively of prime numbers.

Considering in the case $n=38$ the table of coprimes to $38$: $$\begin{matrix} 1&3&5&7&9&11&13&15&17\\ 37&35&33&31&29&27&25&23&21 \end{matrix},$$ one easily observes that every pair contains at least one prime and the result follows as $38=2\cdot19$ is not a prime power.

The point of the above consideration is the following. The construction of long rational product of prime $m_i$ on these lines is hardly possible, as the list of numbers coprime to large $n$ cannot consist exclusively of prime numbers (in fact $n=30$ is the largest such number), and even the trick similar to the case $n=38$ will not work on a long run. Thus, the construction of very long sequences on the base of (4) is impossible.

There exist however much longer sequences than those listed in question. The longest ones by numerical tests are: $$\sqrt{P_{105}}, \sqrt{P_{140}}, \sqrt{P_{180}}, \sqrt{P_{210}},$$ all consisting of 24 multipliers. It can be claimed that there are no sequences of required structure for $n>210$.