Problem

Source: IMOC 2021 N7

Tags: modular arithmetic, number theory



Let $p$ be a given odd prime. Find the largest integer $k'$ such that it is possible to partition $\{1,2,\cdots,p-1\}$ into two sets $X,Y$ such that for any $k$ with $0 \le k \le k'$, $$\sum_{a \in X}a^k \equiv \sum_{b \in Y}b^k \pmod p$$ houkai