Skip to main content
2 of 2
edited body
Will Sawin
  • 148.5k
  • 9
  • 324
  • 563

Your argument is in fact almost complete. It reduces the problem to checking the normalized coefficient $a_q$ of $z^q$ is congruent to $-1$ mod $p$, but since $$ f = z + \frac{z^{q+1}}{(q+1)!} + \dots ,$$ we have $$f^q = z^q + \frac{ q z^{2q}}{ (q+1)!} + \dots$$ and so $$a_q = q! \equiv -1 \mod p.$$


Here is an alternate "bijective" presentation of the same argument. We can interpret $a_n$ combinatorially as the number of $q$-colorings of the numbers from $1$ to $n$ such that each color is used a number of times congruent to $1$ mod $q$.

For $n \geq p$, there is an action of $\mathbb Z/p$ on this set of colorings by rotating the colorings of the numbers $n+1-p, n+2-p, \dots, n$. The number of colorings is congruent mod $p$ to the number of fixed points of this action. A coloring is fixed if the last $p$ numbers have the same color.

Since $q=p-1$, removing the last $q$ numbers in such a coloring doesn't affect the congruent mod $q$ of the number of times each coloring is used, and this gives a bijection between fixed points and colorings of the first $n-q$ numbers satisfying the same congruence condition.

So $a_n \equiv a_{n-q} \mod p$ for $n>q$ and $a_q$ is the number of $q$-colorings of $\{1,\dots, q\}$ with all colors occurring exactly once, which is $q! \equiv -1 \mod p$.

Will Sawin
  • 148.5k
  • 9
  • 324
  • 563