# The Question

How many unique values of $$\cos(\frac{a\pi}{N})\cos(\frac{b\pi}{N})$$ are there for the positive integers $$a,b < N$$ for a given $$N$$? I would like a function $$f(N)$$ which gives that number of unique values.

## Upper Bound

It can be shown that for even $$N$$, $$f(N)$$ is inclusive upper bounded by $$f'(N) = (\sum_{n=1}^{N/2}n) + 1$$

In fact, for many values of N, $$f(N) = f'(N)$$. This upper bound is easier to show from the equivalent formulation of the problem as discussed at the bottom of this question.

## Example

N = 12 is the smallest even N such that $$f(N)\lt f'(N)$$, there is one duplicate value for N = 12:

$$\cos(\frac{3\pi}{12})\cos(\frac{3\pi}{12}) = \cos(\frac{0\pi}{12})\cos(\frac{4\pi}{12})$$

So $$f(12) = 21$$, while $$f'(12) = 22$$.

## Sequence

I have calculated the sequence $$f(N)$$ for $$0 as follows:

1, 2, 4, 4, 7, 7, 11, 11, 16, 16, 22, 21, 29, 29, 36, 37, 46, 45, 56, 56, 67, 67, 79, 77, 92, 92, 106, 106, 121, 116, 137, 137, 154, 154, 172, 170, 191, 191, 211, 211, 232, 232, 254, 254, 276, 277, 301, 299, 326, 326, 352, 352, 379, 377, 407, 407, 436, 436, 466, 458, 497, 497, 529, 529, 562, 560, 596, 596, 631

and for even integers $$0 < N < 70$$, the sequence of $$f'(N) - f(N)$$ is:

0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 2, 0, 0, 5, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 2, 0, 0, 8, 0, 0, 2, 0

Neither of these integer sequences are present on https://oeis.org/.

## Equivalent formulation

Where $$\omega_N$$ is the $$N^{th}$$ root of unity, how many unique values of $$(\omega^a_N + \omega^{-a}_N)(\omega^b_N + \omega^{-b}_N)$$ are there for a given N?

This question has arisen for me while analyzing the spectra of the tensor product of two same-sized cyclic groups. I can expand on this context if it would be helpful for solving the problem.

I do have some additional, various, disconnected insight into the problem. But for the sake of clarity of the question, I will end the question here. Thank you, any insight and/or discussion is appreciated.

• In my paper, Rational products of sines of rational angles, Aequationes mathematicae volume 45, pages70–82(1993), I found all solutions of $\sin x\sin y=\sin z\sin w$ with $x,y,z,w$ rational multiples of $\pi$. There are only finitely many, with some mild restrictions on the variables. Commented Aug 5, 2020 at 6:19
• Thanks Gerry, that sounds great. Where can I obtain a copy of your paper? Commented Aug 5, 2020 at 6:24
• A math library. Well, Springer Link website has it for sale, but I don't think it's worth what they want for it. oeis.org/A134869 looks a lot like every other term of your sequence. Commented Aug 5, 2020 at 6:27
• That sequence is the same as $f'(x)$. It is crucially missing the information present in $f'(x) - f(x)$. Commented Aug 5, 2020 at 6:34
• I have found the following available text: annalesm.elte.hu/annales12-1969/Annales_1969_T-XII.pdf#page=147 on the equation $\cos\alpha_1 + \cos\alpha_2 + \cos\alpha_3 + \cos\alpha_4 = 0$. I am fairly sure this is an equivalent equation to my problem. I will attempt to relate them and post an answer to this question later if I am able to. Commented Aug 5, 2020 at 19:48