Let $a,n\ \in \mathbb Z$ and suppose that $n>1$ is odd, $n\equiv3\pmod{4}$, and that $\gcd(a,n)=1$.
Prove that if $a^{(n-1)/2}\equiv\pm1\pmod{n}$, then $$\left(\frac{a}{n}\right)\equiv a^{(n-1)/2}\pmod{n}$$
I have no idea how to prove the desired result. I started by noting that $a$ is therefore not a Miller-Rabin Witness by our assumption. Further we know that for $n=2^kq+1$, $k=1$ since $n\equiv3\pmod{4}$. However, putting this all together I just got back to the initial assumption that $a^{(n-1)/2}\equiv\pm1\pmod{n}$.
Should I focus more on the other side of the equation (i.e. the Jacobi Symbol)? I was thinking this but I couldn't figure out anything to do with it other than to break it up into: $$ \left(\frac{a}{n}\right)=\left(\frac{1}{n}\right)\left(\frac{a}{n}\right)=\left(\frac{-1}{n}\right)\left(\frac{-1}{n}\right)\left(\frac{a}{n}\right) $$ This didn't seem to take me very far either, however, since $ \left(\frac{1}{n}\right)=1$ and $\left(\frac{-1}{n}\right)=-1$. Any help would be appreciated.