# Prime numbers with binomial coefficients

Let $p$ be an odd prime and $n$ a positive integer. Prove that $p+1$ divides $n$ if and only if $$\sum_{k\equiv j\pmod{p-1}}^n\binom{n}{k}(-1)^{\frac{(k-j)}{p-1}}\equiv 0 \mod p$$ for every $$j\in \left \{ 1,3,5,\ldots,p-2 \right \}$$

-
Where is $n$ in that sum? – Karolis Juodelė May 8 '13 at 16:21
Please clarify the set that $j$ is drawn from I don't understand the pattern. – vadim123 May 8 '13 at 16:24
Fixed. I have been trying to do this question for almost 12 hours but I don't seem to be doing any useful progress. – user76836 May 8 '13 at 16:24
If $n=21,j=1,p=5,$ then $4p+1=n$,however, $$\sum_{k\equiv j\pmod{p-1}}^n\binom{n}{k}(-1)^{\frac{(k-j)}{p-1}} \equiv \binom{21}{1}-\binom{21}{5}+\binom{21}{9}-\binom{21}{13}+\binom{21}{17}-\binom{2‌​1}{21}$$ $$\equiv 21-20349+293930-203490+5985-1 \equiv 1-9+0-0+5-1\equiv 1 ≠0 \mod 5$$ Please tell me what went wrong? – Next May 9 '13 at 5:17
Still some problems,if $n=16,p=7,j=4$, then the left hand of the equation $\equiv 1 \pmod p$.I think $j$ is always odd,so $$j\in \left \{ 1,3,5,7,\ldots,p-2 \right \}$$ – Next May 9 '13 at 14:20