Showing that $\sum_{j=0}^{2n-1}{\cos^n(\frac{j\pi}{2n})(2\cos(\frac{2j\pi}n)+1)\cos(\frac{j\pi}2-\frac{2j\pi}n)}$ is never an integer for $n>10$ I want to show that
$$f(n) = \sum_{j=0}^{2n-1}{\cos^n\left(  \frac{j \pi}{2n}\right) \left( 2\cos \left( \frac{2 j \pi}{n} \right) + 1\right) \cos \left( \frac{j \pi}{2} - \frac{2 j \pi}{n} \right)}$$
is an integer only for $n \in \{0,1,2,3,4, 5, 10\}$.

What I have tried so far is:

*

*Calculate $f(n)$ for each $n$ up to $16$. The values above are the only values I have found that are integers.


*At $n = 16$ it's value is $\frac{1941}{2048}$, just under $1$. By computing $f(n)$ for $16$ and up, I can see that it is always decreasing and therefore is $\lt 1$.
If I can show $\forall n \in \mathbb{N}, n\ge 16, f(n) \lt 1$, then it follows that it can't be an integer, and I am done.
How do I show $f(n)$ is always decreasing (once $n$ gets big enough)?

Claim: for $n\geq 3$,
$$
f(n)= 2^{-n}\cdot 2n\left(\binom{n}{4}+\binom{n}{2}+\binom{n}{0}\right)
$$This immediately gives that for $n\geq 16$, $0<f(n)<1$; then the only integer solutions are the ones shown in the problem statement.
Start with 
$$
f(n) = \sum _{j=0}^{2 n-1}  \left(2 \cos \left(\frac{2 \pi  j}{n}\right)+1\right)
   \cos \left(\frac{\pi  j}{2}-\frac{2 \pi  j}{n}\right)\cos ^n\left(\frac{\pi  j}{2 n}\right)
$$A key observation: each term is real. Use $\cos(\theta)= 1/2 (e^{i\theta}+e^{-i \theta})$:
$$
f(n)=2^{-n} \sum _{j=0}^{2 n-1} \left(2 \cos \left(\frac{2 \pi  j}{n}\right)+1\right) \cos \left(\frac{\pi  j}{2}-\frac{2 \pi 
   j}{n}\right)\left(\exp \left(\frac{\pi i j}{2 n}\right)+\exp \left(\frac{-\pi i j}{2
   n}\right)\right)^n 
$$
$$
=2^{-n} \sum _{j=0}^{2 n-1} \left(2 \cos
   \left(\frac{2 \pi  j}{n}\right)+1\right) \cos \left(\frac{\pi  j}{2}-\frac{2 \pi  j}{n}\right)(-i)^j \left(1+\exp \left(\frac{\pi i j}{n}\right)\right)^n 
$$Now use the Binomial Theorem and switch the order of summation:
$$
f(n) = 2^{-n} \sum _{j=0}^{2 n-1} \left(2 \cos \left(\frac{2 \pi  j}{n}\right)+1\right) \cos \left(\frac{\pi 
   j}{2}-\frac{2 \pi  j}{n}\right) (-i)^j \sum _{k=0}^n \binom{n}{k} \exp \left(\frac{\pi  i j k}{n}\right)
$$
$$
=2^{-n} \sum _{k=0}^n \binom{n}{k} \sum _{j=0}^{2 n-1}  \left(2 \cos \left(\frac{2 \pi 
   j}{n}\right)+1\right) \cos \left(\frac{\pi  j}{2}-\frac{2 \pi  j}{n}\right) (-i)^j \exp \left(\frac{\pi  i j k}{n}\right)
$$Playing around with the summand gives
$$
 \cos \left(\frac{\pi  j}{2}-\frac{2 \pi  j}{n}\right) (-i)^j \exp \left(\frac{\pi  i j k}{n}\right)
$$
$$
= \cos \left(\frac{\pi  j (n-4)}{2 n}\right) \left(\cos \left(\frac{\pi  j
   (n-2 k)}{2 n}\right)-i \sin \left(\frac{\pi  j (n-2 k)}{2 n}\right)\right)
$$But now, by the fact that everything in the problem is real, we can discard the imaginary term. Thus
$$
f(n) =  \sum _{k=0}^n 2^{-n} \binom{n}{k} \sum _{j=0}^{2 n-1}\left(2 \cos \left(\frac{2 \pi  j}{n}\right)+1\right) \cos
   \left(\frac{\pi  j (n-4)}{2 n}\right) \cos \left(\frac{\pi  j (n-2 k)}{2 n}\right)
$$Use the product-to-sum formula for cosine:
$$
f(n) =  \sum _{k=0}^n 2^{-n} \binom{n}{k} \sum _{j=0}^{2 n-1}\frac{1}{2} \left(\cos \left(\frac{\pi  j (k-4)}{n}\right)+\cos \left(\frac{\pi  j (k-2)}{n}\right)+\cos \left(\frac{\pi  j
   k}{n}\right)+\cos \left(\frac{\pi  j (k-n+4)}{n}\right)+\cos \left(\frac{\pi  j (-k+n-2)}{n}\right)+\cos \left(\frac{\pi  j
   (n-k)}{n}\right)\right)
$$
$$
=\sum _{k=0}^n 2^{-n-1} \binom{n}{k} \underbrace{\sum _{j=0}^{2 n-1} \cos \left(\frac{\pi  j (k-4)}{n}\right)+\cos \left(\frac{\pi  j (k-2)}{n}\right)+\cos \left(\frac{\pi  j
   k}{n}\right)}_{S_1}
$$
$$
+\sum _{k=0}^n 2^{-n-1} \binom{n}{k} \underbrace{\sum _{j=0}^{2 n-1}\cos \left(\frac{\pi  j (k-n+4)}{n}\right)+\cos \left(\frac{\pi  j (-k+n-2)}{n}\right)+\cos \left(\frac{\pi  j
   (n-k)}{n}\right)}_{S_2}
$$Now I claim $S_1=S_2$. Indeed, if you sum $S_2$ in the opposite direction, you get exactly $S_1$. Thus we can do away with it, leaving:
$$
f(n)=\sum _{k=0}^n 2^{-n} \binom{n}{k}\sum _{j=0}^{2 n-1} \cos \left(\frac{\pi  j (k-4)}{n}\right)+\cos \left(\frac{\pi  j (k-2)}{n}\right)+\cos \left(\frac{\pi  j
   k}{n}\right)
$$Here's the rub: the inner sums cancel by symmetry, except when $k=4,2,0$, when they are $2n$ (because $\cos(0)=1$). Then we have
$$
f(n) = 2^{-n}\cdot 2n\left(\binom{n}{4}+\binom{n}{2}+\binom{n}{0}\right)
$$I double-checked the closed-form against the original series for $3\leq n\leq 16$ and everything worked!
