When does this sum of combinatorial coefficients equal zero? $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}$.
 A: This is the IF-part only. We get
\begin{align*}\sum_{i=0}^{2k-1} (-1)^i {[2k-1]p \choose ip} &= \sum_{i=1}^{2k} (-1)^{i-1} {[2k-1]p \choose (i-1)p} \\ &=\sum_{i=1}^{k} (-1)^{i-1} {[2k-1]p \choose (i-1)p}+\sum_{i=k+1}^{2k} (-1)^{i-1} {[2k-1]p \choose (i-1)p} \\ &=\sum_{i=1}^{k} (-1)^{i-1} {[2k-1]p \choose (i-1)p}+\sum_{i=1}^{k} (-1)^{k+i-1} {[2k-1]p \choose (k+i-1)p} \\ &=\sum_{i=1}^{k} (-1)^{i-1} {[2k-1]p \choose (i-1)p}+ \sum_{j=-k}^{-1} (-1)^{k-j-1} {[2k-1]p \choose (k-j-1)p} \\ &=\sum_{i=1}^{k} (-1)^{i-1} {[2k-1]p \choose (i-1)p}+ \sum_{j=1}^{k} (-1)^{2k-j} {[2k-1]p \choose (2k-j)p}
\\ &=\sum_{i=1}^{k} (-1)^{i-1} {[2k-1]p \choose (i-1)p}+ (-1)^{2k-i} {[2k-1]p \choose (2k-i)p} \\ &=\sum_{i=1}^{k} (-1)^{i-1} {[2k-1]p \choose (i-1)p}+ (-1)^{2k-i} {[2k-1]p \choose (2k-1-(2k-i))p}
\\ &=\sum_{i=1}^{k} (-1)^{i-1} {[2k-1]p \choose (i-1)p}+ (-1)^{2k-i} {[2k-1]p \choose (i-1)p}
\\ &=\sum_{i=1}^{k} 0 = 0
\end{align*}
What happened:


*

*First step: We increase all indices by 1, therefore, we have to
reduce the $i$s in the formula by 1.

*Second step: Split the sum in two parts.

*Third step: We decrease all indices in the second sum by $k$, therefore, we have to
increase $i$s in the formula by $k$.

*Fourth step: Negating indices of the second sum.

*Fifth step: We increase all indices in the second sum by $k+1$, therefore, we have to
reduce the $i$s in the formula by $k+1$.

*Sixth step: Write the sum as one sum.

*Seventh and eighth step: Binomial properties.

*Ninth step: $i-1$ and $2k-i$ have different parity since they differ $2k-2i+1$. Therefore the terms have opposite signs and thus the sum equals 0.

A: 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.
