TITLE: When does this sum of combinatorial coefficients equal zero?
QUESTION [6 upvotes]: $p>2$ is a prime number, $n\in \mathbb{N}$. Is the following statement true or false? Thanks.
$$\sum_{i=0}^{\lfloor n/p\rfloor}(-1)^i {n\choose ip}=0$$ iff $n=(2k-1)p$ for some $k\in \mathbb{N}$.

REPLY [3 votes]: Let $\omega=\exp\left(\frac{2\pi i}{p}\right)$. Since $f(n)=\frac{1}{p}\left(1+\omega^n+\ldots+\omega^{(p-1)n}\right)$ equals one if $n\equiv 0\pmod{p}$ and zero otherwise, we have:
$$S(n)=\sum_{i\equiv 0\pmod{p}}\binom{n}{i}(-1)^i=\frac{(1-1)^n+(1-\omega)^n+\ldots+(1-\omega^{p-1})^n}{p}\tag{1}$$
so $p\cdot S(n)$ is the sum of the $n$-th powers of the roots of $q(x)=1-(1-x)^p$. 
Assuming that $M$ is the companion matrix of $q(x)$, it follows that:
$$ S(n) = \frac{1}{p}\cdot\text{Tr}(M^n)=\frac{1}{p}\,\text{Tr}\,\begin{pmatrix}1 & -1 & 0&0&\ldots\\0 & 1 & -1 & 0 & \ldots\\\vdots & 0 & \ddots &\ddots&\vdots\\0&\ldots&\ldots&1&-1\\-1&0&\ldots&\ldots&1\end{pmatrix}^n. \tag{2}$$
By the Cayley-Hamilton theorem, $\{S(n)\}_{n\geq 0}$ is a linear recurring sequence with the same characteristic polynomial of $M$, i.e. $1-(1-x)^p$. On the other hand, $(1)$ gives that $S(n)$ cannot be zero if $n\not\equiv 0\pmod{p}$, and:
$$\begin{eqnarray*} S(mp)&=&\frac{(1-\omega)^{mp}+\ldots+(1-\omega^{p-1})^{mp}}{p}\\&=&\frac{1}{p}\sum_{x\in Z}(1-x)^{mp}=\frac{1}{p}\sum_{x\in Z}\sum_{k=0}^{m}\binom{mp}{kp}(-x)^{kp}\\&=&\sum_{k=0}^{m}\binom{mp}{kp}(-1)^{kp}\tag{3}\end{eqnarray*}$$
Now, it is not difficult to prove the only if part of the statement.