In the context of the multiplicative group $(\mathbb{Z}/m\mathbb{Z})^\times$ of congruence classes modulo $m$ coprime with $m$, is there a theorem that states something about the order of a given element and wheter that element is a quadratic residue or not? Note that $(\mathbb{Z}/m\mathbb{Z})^\times$ is not necessarily cyclic, so I'm not looking for arguments that use the existence of a primitive root.
I'm trying to prove a relation between arithmetic functions and quadratic residues, but I stumbled upon the following problem: if $p$ is a odd prime coprime with $m$, and the order of $p$ is odd, $p$ is a quadratic residue modulo $m$?
I have a strong feeling that yes, and that it involves Lagrange's Theorem and the fact that $\frac{\varphi(m)}{|p|}$ is even (Here I use $|p|$ to denote the order of $p$ inside $(\mathbb{Z}/m\mathbb{Z})^\times$), but somehow I can't bring it all together. Am I missing something?
EDIT: What I'm precisely looking for is the eigenvalues of the eigenvectors of this linear operator on a vector space of arithmetic functions ($f: (\mathbb{Z}/m\mathbb{Z})^\times \rightarrow \mathbb{C}$) over the complex numbers: for a prime $p$ coprime with $m$, define $(T_pf)(x) = f(px)$. I already found that any Dirichlet character $G(x)$ defined on $m$ is a eigenvector on this operator and by the multiplicative property $G(p)$ is a eigenvalue. As $m$ is even ($m$ is defined as $4d$ for some integer $d$) I cannot use neither the Legendre or the Jacobi symbol as my eigenvector character, I would need to have at least the Kronecker symbol. What I'm trying to prove is that the Legendre symbol $(\frac{d}{p})$ is a possible eigenvalue too, and that implies the question on the second paragraph.
We will assume (it makes no real difference) that $m$ is odd. Let $c$ be relatively prime to $m$. Let the prime power factorization of $m$ be given by $$m=p_1^{a_1}p_2^{a_2}\cdots p_t^{a_t}.$$ If $c$ has odd order modulo $m$, it has odd order modulo each of the $p_i^{a_i}$. So $c$ is a quadratic residue modulo each $p_i^{a_i}$.
It follows by the Chinese Remainder Theorem that $c$ is a quadratic residue modulo $m$.