This is an interesting problem I read that has me stumped.
Let $(RR)$ denote the number of pairs $(n,n+1)$ in the set $\{1,2,\dots,p-1\}$ such that $n$ and $n+1$ are both residues modulo $p$. Let $(NR)$ denote the pairs where $n$ is a nonresidue, and $n+1$ is a residue modulo $p$. Do the same for $(NN)$ and $(RN)$.
The question is, what are $(RR)+(RN),(NR)+(NN),(RR)+(NR),(RN)+(NN)$?
I know that if $g$ is a primitive root, then the residues are the even powers of $g$, and the nonresidues are the odd powers of $g$. So the pairs in $(RR)$ have form $(g^{2k},g^{2j})$, and I would like to count the pairs that can be expressed as $n=g^{2k},n+1=g^{2j}$. This implies $g^{2j}-g^{2k}=1=g^{p-1}$. I could set up similar equations for the other three types of pairs, but I don't see any thing nice to grab onto and work with. Maybe computing $(RR)+(RN)$ is easier than computing $(RR)$ and $(RN)$ separately for some reason?
How could one approach computing these? Thank you.
Source: Ireland/Rosen #5.29