Kindly read the following carefully, before generalizing.
1) If $(a, p) = 1$ and $p$ is some odd prime. Then the Legendre symbol $\left(\frac ap\right)$ is defined to be equal to $1$ if $a$ is a quadratic residue of $p$ and is equal to $-1$ if $a$ is a quadratic non-residue of $p$.
2) For a prime of the form $5k+2$, the statement $5^{\frac{5k+1}{2}}\equiv (5k+1) \pmod{ 5k+2}$ is true or not?
How to generalize or justify the above statements?