Questions tagged [quadratic-residues]

An integer $a$ is a quadratic residue modulo $p$ if $a \equiv x^2 \pmod p$ for some integer $x$. If $a$ is not a quadratic residue modulo $p$, it is said to be a quadratic nonresidue modulo $p$.

An integer $a$ is a quadratic residue modulo $p$ if $a \equiv x^2 \pmod p$ for some integer $x$. If $a$ is not a quadratic residue modulo $p$, it is said to be a quadratic nonresidue modulo $p$.

In the case where $p$ is an odd prime, we often make use of the Legendre symbol

$$\left(\frac{a}{p}\right) = \begin{cases} 0 & p \mid a\\\ 1 & a\ \text{is a quadratic residue modulo}\ p\ \text{and}\ p \not\mid a\\\ -1 & a\ \text{is a quadratic nonresidue modulo}\ p. \end{cases}$$

There are $\frac{p-1}{2}$ quadratic residues (and nonresidues) for an odd prime $p$.

A powerful result regarding quadratic residues is the Law of Quadratic Reciprocity:

If $p$ and $q$ are odd primes, then $$\left(\frac{p}{q}\right) = \left(\frac{q}{p}\right)(-1)^{\frac{p-1}{2}\frac{q-1}{2}}.$$

833 questions
38
votes
8 answers

$-1$ is a quadratic residue modulo $p$ if and only if $p\equiv 1\pmod{4}$

I came across this problem and I believe Lagrange's theorem is the key to its solution. The question is: Let $p$ be an odd prime. Prove that there is some integer $x$ such that $x^2 \equiv −1 \pmod p$ if and only if $p \equiv 1 \pmod 4$. I…
Mike
  • 441
29
votes
2 answers

Why are quadratic residues more interesting than cubic residues?

There is a large theory of quadratic residues. As far as I know there is no comparably large theory of cubic residues or history of studying them. A search on this site finds hundreds of questions about quadratic residues (which even has its own…
MJD
  • 67,568
  • 43
  • 308
  • 617
19
votes
3 answers

Legendre symbol, second supplementary law

$$\left(\frac{2}{p}\right) = (-1)^{(p^2-1)/8}$$ how did they get the exponent. May be from Gauss lemma, but how. Suppose we have a = 2 and p = 11. Then n = 3 (6,8,10), but not $$15 = (11^2-1)/8$$ n is a way to compute Legendre symbols from Gauss…
16
votes
3 answers

The number of solutions of $ax^2+by^2\equiv 1\pmod{p}$ is $ p-\left(\frac{-ab}{p}\right)$

What I need to show is that For $\gcd(ab,p)=1$ and p is a prime, the number of solutions of the equation $ax^2+by^2\equiv 1\pmod{p}$ is exactly $$p-\left(\frac{-ab}{p}\right)\,.$$ I got a hint that I have to use Legendre symbol from the answer. I…
16
votes
3 answers

Prove that if $p$ is an odd prime that divides a number of the form $n^4 + 1$ then $p \equiv 1 \pmod{8}$

Problem Prove that if $p$ is an odd prime that divides a number of the form $n^4 + 1$ then $p \equiv 1 \pmod{8}$ My attempt was, Since $p$ divides $n^4 + 1 \implies n^4 + 1 \equiv 0 \pmod{p} \Leftrightarrow n^4 \equiv -1 \pmod{p}$. It follows…
15
votes
3 answers

Can we generalize the quadratic formula to modular arithmetic?

Does the quadratic formula $\displaystyle x = \frac{-b \pm \sqrt{b^2-4ac}}{2a}$ hold modulo $n$ for $ax^2 + bx + c \equiv 0 \pmod n$? Computing the square root would require factoring $n$ and using either special-case formulas or the Tonelli-Shanks…
15
votes
1 answer

Visualizing quadratic residues and their structure

[I corrected the pictures and deleted one question due to user i707107's valuable hint concerning cycles.] Visualizing the functions $\mu_{n\ \mathsf{ mod }\ m}(k) = kn\ \ \mathsf{ mod }\ \ m$ as graphs reveals lots of facts of modular…
14
votes
3 answers

Find all odd primes $p$ for which $15$ is a quadratic residue modulo $p$

I want to find all odd primes $p$ for which $15$ is a quadratic residue modulo $p$. My thoughts so far: I want to find $p$ such that $ \left( \frac{15}{p} \right) = 1$. By multiplicativity of the Legendre symbol, this is equivalent to $ \left(…
TRY
  • 141
14
votes
2 answers

Is every non-square integer a primitive root modulo some odd prime?

This question often comes in my mind when doing exercices in elementary number theory: Is every non-square integer a primitive root modulo some odd prime? This would make many exercices much easier. Unfortunately I seem unable to discover anything…
14
votes
1 answer

If for the first $\|n\|$ primes $p_i, \left(\frac{p_i}n\right)=+1$, then $n$ is a square

Can we prove or disprove (perhaps under some standard hypothesis): $$\text{If for the first }\|n\|\text{ primes }p_i, \left(\dfrac{p_i} n\right)=+1,\text{ then }n\text{ is a square.}$$ where $\|n\|$ is the number of bits in $n$, $\left(\dfrac p…
14
votes
3 answers

What is the intuition behind the law of quadratic reciprocity?

Law of quadratic reciprocity states as follows: Law of quadratic reciprocity — Let $p$ and $q$ be distinct odd prime numbers, and define the Legendre symbol as: $$ \left(\frac {q}{p}\right)=\left\{\begin{array}{rl} 1 & \text{if } n^2\equiv q \pmod…
Bach
  • 5,874
  • 2
  • 22
  • 44
14
votes
1 answer

If $a$ is a quadratic residue modulo every prime $p$, it is a square - without using quadratic reciprocity.

The question is basically the title itself. It is easy to prove using quadratic reciprocity that non squares are non residues for some prime $p$. I would like to make use of this fact in a proof of quadratic reciprocity though and would like a proof…
13
votes
5 answers

Finding primes $p$ such that $p\nmid 2^n+3^m,\forall n,m\in\mathbb{N}$

I want to determine prime numbers $p$ with this property $(P)$: $p\nmid 2^n+3^m,\forall n,m\in\mathbb{N}$. ($m,n$ are allowed to be zero) I was able to find that primes $p$ with $p\equiv 23 (\text{mod}\: 24)$ have the desired property, as we have…
13
votes
2 answers

If $p$ is prime, then $x^2 +5y^2 = p \iff p\equiv 1,9 $ mod $(20)$.

Let $p\neq 2,5$ be prime. I wish to show that: $x^2 +5y^2 = p \Leftrightarrow p\equiv 1,9 $ mod $(20)$. I proved to $\Rightarrow$ part, means $x^2 +5y^2=p \Rightarrow p\equiv 1,9 $ mod $(20)$. For $\Leftarrow$ , $p\equiv 1,9(20) \Rightarrow p\equiv…
12
votes
2 answers

Is there a univariate rational polynomial which represents only squares in $\mathbb{R}$ and $\mathbb{Q}_2$, but not all other $\mathbb{Q}_p$?

Let $K$ be a field; I will say a polynomial $f \in K[X]$ represents an element $a \in K$ if there exists a $b \in K$ such that $f(b) = a$. Denote by $\mathbb{Q}$, $\mathbb{R}$ and $\mathbb{Q}_p$ the fields of rational, real and $p$-adic numbers…
Bib-lost
  • 4,050
  • 16
  • 44
1
2 3
55 56