# Evaluating the Legendre symbol $\left(\frac{5}{p}\right)$ using Gauss's lemma instead of quadratic reciprocity.

So basically, I want to find the Legendre symbol $\left ( \frac{5}{p} \right )$ using Gauss's lemma instead of quadratic reciprocity. The first part of my problem states

Write out the first $\frac{\left ( p-1 \right )}{2}$ multiples of 5. Then count the number of them that are between $p$ and $\frac{p}{2}$ or $\frac{3p}{2}$ and $2p$.

This part I am confused on. So I start out by writing out the multiples of 5, where I get I get $\frac{11-1}{2} = 5$ , $\frac{31-1}{2} = 15$, $\frac{41-1}{2} = 20$,$\frac{61-1}{2} = 30$, $\frac{71-1}{2} = 35$ and so on.

The problem doesn't state how many times to do this. It seems all the numbers I listed are not between $\frac{p}{2}$ and $p$.

From there, I am supposed to find out why the number gives me the $s$ in Gauss's lemma, which I can only assume represents the $\left( \frac{a}{p} \right) \equiv (-1)^{s}$.

The number of multiples of $5$ in between $p$ and $p/2$ appears to depend on the value of $p$ modulo $10$. Note that $p$ is odd, so this is uniquely determined by the value of $p$ modulo 5.
For instance, if $p = 10k +3$, then $p/2 = 5k + 3/2$ and therefore the multiples of $5$ in the given interval $(p/2, p) = (5k+3/2, 10k+3)$ are $5k+5, 5k+10, \ldots, 10k-5, 10k$. In this case there are $k = (p-3)/2$ multiples.
Within the interval $(3p/2, 2p) = (15k+9/2, 20k+6)$ the multiples of $5$ are $15k+5, 15k+10, \ldots, 20k, 20k+5$. Here there are $k+1 = (p+2)/2$ multiples.
You can then plug in $s = k+ (k+1)$ into Gauss' lemma to get the desired result. (You need to do this for each possible residue class $p$ could have modulo $10$.) This works since the values of $5a$ for $a\le (p-1)/2$ whose residues mod $p$ are greater than $p/2$ are precisely those in the two intervals given, since all such multiples are bounded above by $5p/2$.