We are interested, in the number of $n$-elemental subsets of $\{1, \dots, N\}$, whose sum is divisible by N, therefore we are trying to generalize this proof: Find the number of all subsets of $\{1, 2, \ldots,2015\}$ with $n$ elements such that the sum of the elements in the subset is divisible by 5.
We have problems, in the last step, where an equality for f is obtained. We tried to do this more generally and are stuck here: for $ j = 1, \dots N-1$ let $\omega$ be $N$-th root of unity, then $$ f(\omega^j,x ) = \prod_{k=1}^N (1 + \omega^{jk} x) = \prod_{k = 1}^{\frac{N}{gcd(N,j)}}(1+ \omega^{k * gcd(N,j)}x)^{gcd(N,j)} $$ By the properties of the roots of unity.
Now we have no clue, on how to simplyfy this further, such that we can say something about the coefficients of the polynomial $\frac{1}{N}\sum_{j = 0}^{N-1} f(\omega^j,x)$, which we are interested in. We are interested in a similar display as in step of the proof from the proceding post (in their case the display was $(1+x^5)^{403}$)