6

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}$)

  • Isn't this covered by the (impressively thorough) solution posted by Marko Riedel in the post you link to ? – lulu Dec 06 '24 at 12:31
  • @lulu But if I understand it correctly then there is only a general display for the case q is a multiple of k and k is an odd prime. But in our case $k = q = N$, but not necessarily an odd prime. – Desperate_housewife Dec 09 '24 at 10:06

1 Answers1

1

We have

$$ \large f(\omega^j, x) = \prod_{k=1}^N (1+x\omega^{jk}) \\ = (-x)^N \prod_{k=1}^N ((-x)^{-1}-\omega^{jk}) \\ = (-x)^N \left(\prod_{k=1}^{ \frac{N}{\gcd(N,j)} } ((-x)^{-1}-\omega^{jk})\right)^{\gcd(N,j)} \\ = (-x)^N ((-x)^{-\frac{N}{\gcd(N,j)}}-1)^{\gcd(N,j)} \\ = (1-(-x)^{ \frac{N}{\gcd(N,j)} })^{\gcd(N,j)}. $$

Now

$$ \large [x^n] f(\omega^j, x) = \begin{cases} {\binom{\gcd(N,j)}{n\gcd(N,j)/N} } (-1)^{n+n\gcd(N,j)/N} & \text{ if } \frac{n \gcd(N,j)}{N} \in \mathbb Z \\ 0 & \text{ otherwise} \end{cases} $$

Hence the anwer is

$$ \large \frac{1}{N}\sum_{j=0}^{N-1} [x^n] f(\omega^j, x) \\ = \frac{1}{N}\sum_{j=0}^{N-1} {\binom{\gcd(N,j)}{n\gcd(N,j)/N} } (-1)^{n+n\gcd(N,j)/N} {\huge1}_{ \frac{N}{\gcd(N,j)} | n} $$

where ${\large 1}_{d|n}$ is the indicator function of $d$ dividing $n$.

There are $\varphi(\frac{N}{g})$ values for $j$ such that $\gcd(N,j)=g$. (Here $\varphi$ is the Euler's totien function.) And each divisor $d$ of $N$ is a $g$ for some $j$. So we can write the sum over the divisors of $N$ (and also exchange $\frac{N}{d}$ with $d$ since both of these run over all the divisors of $N$):

$$ \frac{1}{N} \sum_{d|N} \binom{N/d}{n/d} (-1)^{\frac{n}{d}(d+1)} \varphi(d) {\large 1}_{d|n} $$

And then because $d$ also needs to divide $n$, the sum is only over divisors of $\gcd (N,n)$ and we get the formula

$$ \large \frac{1}{N}\sum_{d | \gcd(N,n)} (-1)^{\frac{n}{d}(d+1)} \varphi(d) \binom{N/d}{n/d}. $$

ploosu2
  • 12,367