Suppose $\omega$ is a primitive seventh root of unity. I would like to find as simple an expression as possible for $ \sum_{j=0}^6 (1 + \omega^j)^n. $
The book I am looking at gives $ 2^n \left\lfloor 1+2\sum_{j=1}^3 \cos{\frac{\pi j n}{7}} \cos^n \frac{ \pi j}{j} \right\rfloor $ with no explanation, and I am wondering how they got this. (I am also wondering if it is a typo, since this book seems to have quite a few --- if it is correct as written, why not cancel the rightmost $j$'s and rewrite $\cos^n \pi$ as $(-1)^n$?)
Added:
Motivation: this is the last step in simplifying the expression $\sum_{k=0}^{\lfloor n / 7 \rfloor} {n \choose 7k}.$ This is problem #42(f) in section 1 of Lovasz's Combinatorial Problems and Exercises, Second Edition. In my copy, the problem is on p. 21, and the solution (which makes sense until the last step) is on p. 195.
(To be clear, I have pulled out a factor of $\frac{1}{7}$ which appears somewhere along the way but is irrelevant to the above.)