Solution (source code)

= Solution

Write $\chi(x)=(x/p)$. Choose a <quadratic nonresidue> $a$. Multiplication by $a$ permutes $\mathbb F_p$, while <multiplicativity of the Legendre symbol> gives $\chi(ax)=-\chi(x)$. Therefore
$$
\sum_{x\in\mathbb F_p}\chi(x)
=\sum_{x\in\mathbb F_p}\chi(ax)
=-\sum_{x\in\mathbb F_p}\chi(x),
$$
so the <complete Legendre-symbol sum> is zero.

Since $4x(x+1)=(2x+1)^2-1$ and $\chi(4)=1$, the bijection $x\mapsto2x+1$ reduces the next sum to $\sum_y\chi(y^2-1)$. Count pairs $(y,t)\in\mathbb F_p^2$ satisfying $t^2=y^2-1$. On one hand their number is
$$
\sum_y\bigl(1+\chi(y^2-1)\bigr).
$$
On the other hand $(y-t)(y+t)=1$, and every $u\in\mathbb F_p^\times$ gives exactly one pair by $y-t=u$, $y+t=u^{-1}$. There are therefore $p-1$ pairs, proving the <quadratic Legendre-symbol correlation>
$$
\sum_{x\in\mathbb F_p}\chi(x(x+1))=-1.
$$

For $1\leq z\leq p-2$, the indicator that both $z$ and $z+1$ are quadratic residues is $(1+\chi(z))(1+\chi(z+1))/4$. Summing and using the two identities above gives the <number of consecutive nonzero quadratic residues modulo an odd prime>
$$
\frac14\left(p-2-\chi(-1)-1-1\right)
=\boxed{\frac{p-4-(-1)^{(p-1)/2}}4}.
$$