1) Show that $m\longmapsto \left(\frac{m}{q}\right)$ where $\left(\frac{m}{q}\right)$ denote Legendre Symbole is a Dirichlet character modulus $q$.
2) Let $q$ a prime. Show that the smallest $m\geq 1$ s.t. $m$ is not a quadric residue modulus $p$ is $\mathcal O(p^{1/2}\log(q))$.
I recall that $m$ is a quadric residue modulus $q$ if $(m,q)=1$ and there is $\ell$ s.t. $\ell^2\equiv m\pmod q$ and also that $$\left(\frac{m}{q}\right)=\begin{cases}1& m\text{ is a quadric residue modulus $q$}\\ -1&(m,q)=1\text{ but $m$ is not a quadric residue modulus $q$}\\ 0&(m,n)>1\end{cases} $$ Attempts
1) $r(1)=1$ since $(q,1)=1$ and $1^2\equiv 1\pmod q$.
Let $r(m)=\left(\frac{m}{q}\right)$. Let $m,n\in \mathbb Z$. If $d=(mn,q)>1$ then $(m,d)>1$ or $(n,d)>1$ and thus $0=r(mn)=r(m)r(n)$.
Let $(mn,q)=1$ and $mn$ a quadric residue. Suppose $m$ is a quadric residue. Then $\ell^2\equiv m\pmod q$ and $k^2\equiv mn\pmod q$. Therefore $(\ell^{-1}q)^2\equiv n\pmod q$ and thus $n$ is a quadric residue. If $m$ is not a quadric residue, then $n$ can't be a quadric residue since by the previous part, if $n$ is a quadric residue, then so is $m$. So $1=r(mn)=r(m)r(n)$.
Q1) Is it correct ? If yes, how can I prove that if $mn$ is not a quadric residue, then $m$ or $n$ must be a quadric residue ?
2) I have no idea. Any help is welcome.