TITLE: powered partition function generator: 1/2 of them are zeros?
QUESTION [14 upvotes]: Ramanujan delivered his famous congruences 
$$p(5n+4)\equiv_50, \qquad p(7n+5)\equiv_70, \qquad p(11n+6)\equiv_{11}0$$
for the integer partitions with generating function $F(x)=\prod_{k=0}^{\infty}\frac1{1-x^k}=\sum_{n\geq0}p(n)x^n$. 
Let $p\geq5$ be a prime number, and consider the series
$$F(x)^{p-1}=\sum_{n\geq0}a_p(n)x^n.$$
Experimental evidence suggests (curiously) that, modulo $p$, exactly half of the $p-1$ rows
$$\begin{cases}
a_p(pn+1): n\geq0 \\
a_p(pn+2): n\geq0 \\
a_p(pn+3): n\geq0 \\
\qquad\dots\dots\dots \\
a_p(pn+p-1): n\geq0
\end{cases}$$
are identically zero.

Question. Is this true? Why? Or, is it known?
Question. Why does this fail to be true for the prime $p=3$?

For example, $a_5(5n+3)\equiv_50$ and $a_5(5n+4)\equiv_50$ for any $n\geq0$.
Notation. $\equiv_p$ means congruent modulo $p$.

REPLY [22 votes]: This is true. First, note that by the Pentagonal number theorem due to Euler,
$$\frac{1}{F(x)} = \sum_{k \in \mathbb{Z}} (-1)^k  x^{\frac{k}{2}(3k-1)}.$$
For a given prime $p \ge 5$, the function $f(k)=\frac{k}{2}(3k-1),f:\mathbb{Z}\to \mathbb{F}_p$ has only $\frac{p+1}{2}$ values in its image, one of which is $0$. This follows by completing the square:
$$ \frac{k}{2}(3k-1) = \frac{3}{2}\left( (k-\frac{1}{6})^2 - \frac{1}{6^2} \right).$$
We deduce that there are $\frac{p-1}{2}$ non-zero distinct values $a_1,\cdots,a_{\frac{p-1}{2}}$ modulo $p$ such that the $n$'th coefficient of $\frac{1}{F(x)}$ is zero if $n \equiv a_i \bmod p$ for some $i$. We conclude by noting that modulo $p$,
$$F(x)^{p-1} \equiv_p \frac{F(x^p)}{F(x)}.$$
In particular, $a_p(n) = 0$ if $n \equiv a_i \bmod p$.
The result does not hold for $p=3$ because $f$ behaves differently then (it is surjective in that case).