# Number Theory, Squares in $\mathbb{Z}_p ^*\,\;$ for odd prime $p$

Let $p$ be an odd prime and $\mathrm{gcd}(n, p) = 1.$ Assume that $n = p_1^{a_1} p_2^{a_2} ... p_k ^{a_k}$ is the prime factorization of n. Prove $$\left(\frac{n}{p}\right) = \left(\frac{p_1}{p}\right)^{i_1} \left(\frac{p_2}{p}\right)^{i_2} ... \left(\frac{p_k}{p}\right)^{i_k},$$ where $i_j = 1$ if $a_j$ is odd, and $i_j = 0$ if $a_j$ is even.

• I guess you must be talking of the Jacobi Symbol and, thus, you already know, hopefully, that it is a multiplicative function, so...what exactly is your problem?? Nov 19 '12 at 17:32
• @DonAntonio No need to be sarcastic...you seem to be particularly critical today, given some of you other comments. Perhaps that is your style? It's fine to ask for clarification ("what do you know about..." or "where are you stuck"? But it can be demeaning to suggest that a user "ought" to know how to proceed. Why would someone trouble to post a question if one already knows how to solve it? Nov 19 '12 at 17:44
• i understand it is jacobi symbol problem is getting there from this question and trying to make connection is where I am having difficulty Nov 19 '12 at 18:00
• I've no idea where did you get the impression I was being sarcastic: not at all. What I can see is that you're particularly sensitive, at least today and at least wrt this thread. It is my personal idea that anyone dealing with the Jacobi symbol learns almost immediately that it is a multiplicative function, so my question stands: whether I am right or not, where is exactly the problem qwith this question? We could save us all this nonsense if askers added some insights, ideas, info to their questions, don't you think? Nov 19 '12 at 21:48

To reduce the exponents $a_j$ to the $i_j$, you can use the following fact:
Let $m$ and $p$ be relatively prime, and let $n=a^2 m$, where $a$ and $p$ are relatively prime. Then $n$ is a quadratic residue of $p$ if and only if $m$ is a quadratic residue of $p$. However, this fact is not really needed: see below.
From this you can conclude that in general $(ab/p)=(a/p)(b/p)$. (I am using $(m/p)$ for the Legendre symbol.) From the product formula for two terms, one can see that $$(c_1c_2\cdots c_k/p)=(c_1/p)(c_2/p)\cdots(c_k/p).$$ That is very close to the formula you want to prove. Note that in particular, $(c^a/p)=(c/p)^a$. So $(c^a/p)=1$ if $a$ is even, and $(c^a/p)=(c/p)$ if $a$ is odd.