This question was asked in an assignment which I am solving and I couldn't solve it.
Prove that for any prime $p>5$ there exist integers $1\leq a,b \leq p-1$ for which $\binom{a}{p}=\binom{a+1}{p}=1$ and $\binom{b}{p}=\binom{b+1}{p} =-1$.
Quadratic residues and non-residues are equal in number , if I prove that any 2 residues are consecutive then non-residues will be automatically proved consecutive.
But I am unable to prove and 2 residues to be consecutive. For theory, I am studying David M Burton's book.
Can you please help?
Let $p>5$. We always have $\left(\frac{1}{p}\right)=1$ and $\left(\frac{4}{p}\right)=1$. Then there are 2 cases:
Case 1: $\left(\frac{2}{p}\right)=1$ or $\left(\frac{3}{p}\right)=1$. In this case there are at least 3 quadratic residues in $\{1,2,3,4\}$. Hence there are at least $\frac{p-1}{2}-1$ quadratic non-residues and at most $\frac{p-1}{2}-3$ quadratic residues in the set $\{5,\dots,p-1\}$ (because the number of quadratic residues is equal to the number of quadratic non-residues). Thus by the pigeon hole principle, there have to be consecutive quadratic non-residues.
Case 2: $\left(\frac{2}{p}\right)=\left(\frac{3}{p}\right)=-1$. We know that $p>7$ in this case, because $3^2\equiv 2\; (7)$, but $2$ is not a quadratic residue. Thus we may look at the residue classes of $\{4,5,6,7,8,9,10\}$. If it contains consecutive quadratic residues, we are done. Otherwise, because $4$ and $9$ are squares, $\{5,6,7,8,10\}$ contains at least $4$ quadratic non-residues. This means that the set $\{1,2,3,4,5,6,7,8,9,10\}$ contains at least $6$ quadratic non-residues and at most $4$ quadratic residues. We then conclude similarly to Case 1.