Let $p$ be a prime. Prove that $\sum_{i=0}^{p}\binom pix^i \equiv x + 1 \pmod p$

Let $p$ be a prime. Prove that $\displaystyle\sum_{i=0}^{p}\binom pix^i \equiv x + 1 \pmod p$.

i got

\begin{align} & \frac{p!}{i!(p-i)!}(x^0+x^1+x^2+x^3+x^4+\cdots+x^p) \\[4pt] = {} & 1\cdot (x^0 + x^1 + x^2 + x^3 + x^4 +\cdots+x^p) \end{align}

so does $(x^0+x^1+x^2+x^3+x^4+\cdots+x^p) = x + 1 \pmod p$?! am i on the right track here?

• First check whether the sum is right. Do you mean $(a/p)$ or do you mean $(i/p)$? This looks like a Legendre symbol, Is it? It is indeed true that for most $x$ we have $1+x+x^2+\cdots +x^p\equiv x+1\pmod{p}$. – André Nicolas May 18 '15 at 2:47
• i meant to write (p/i)! – user241340 May 18 '15 at 2:52
• Or did you mean $\binom{p}{i}$, binomial coefficient, no bar? – André Nicolas May 18 '15 at 2:56
• yeah, thats what i meant? no bar – user241340 May 18 '15 at 2:57
• And you meant the sum to start at $i=0$, right? – André Nicolas May 18 '15 at 2:57

All $\binom{p}{i} \equiv 0$ unless $i =0, p$ so all these terms go away from the sum only the terms that remain are 1 and $x$. Hence the result. Or by using binomial theorem we have $\sum_{i =0}^{p} \binom{p}{i}x^i=(1+x)^p$ so now by Fermat's little theorem we have $(1+x)^p \equiv (1+x)$.