Problem 6. Let $p>2$ be a prime number. Find the number of the subsets $B$ of the set $\{1,2, \ldots, p-1\}$ such that $p$ divides the sum of the elements of $B$.

Ivan Landjev
6. Consider the set $A^{\prime}=A \cup\{0\}$ instead of $A$. Let $B=\left\{a_{1}, a_{2}, \ldots, a_{k}\right\}$ be a nonempty subset of $A^{\prime}$. Set

$$
i+B=\left\{i+a_{1}(\bmod p), i+a_{2}(\bmod p), \ldots, i+a_{k}(\bmod p)\right\}
$$

Note that the sums of the elements of the sets $i+B, i=0,1, \ldots, p-1$, are all distinct. Indeed, if for some $s$ and $t$ the sums are equal then

$$
\begin{aligned}
& \sum_{i=1}^{k}\left(s+a_{i}\right) \equiv \sum_{i=1}^{k}\left(t+a_{i}\right)(\bmod p) \\
\Longleftrightarrow & k s+\sum_{i=1}^{k} a_{i} \equiv k t+\sum_{i=1}^{k} a_{i}(\bmod p) \\
\Longleftrightarrow & k s \equiv k t(\bmod p)
\end{aligned}
$$

which is equivalent to $s=t$.

Therefore the set of the subsets of $A^{\prime}$ (without the empty set and $A^{\prime}$ ) partitions into $\frac{2^{p}-2}{p}$ groups and every group contains $p$ sets. Moreover the sums of the elements of the subsets in every group run over all residues modulo $p$.

Therefore the number of the subsets having sums divisible by $p$, equals $\frac{2^{p}-2}{p}$. Since 0 is included in half of them it follows that the number of the subsets $B$ of $A$ (including the empty set and excluding $A$ ) equals $\frac{2^{p}-2}{2 p}$.

Replacing the empty set by $A$ (having sum $\frac{p(p-1)}{2}$, which is divisible by $p$ ), we conclude that the answer is $\frac{2^{p-1}-1}{p}$.