I have a congruence of the form $$ax^2+bx \equiv -1 \pmod{p},$$ where $p$ is an odd prime and $a,b \in \mathbb{Z}$. Given $a$ and $b$, is there a general method to finding $p$ such that the above congruence holds?
2026-04-20 10:02:27.1776679347
Finding a prime $p$ to solve a quadratic congruence $\pmod{p}$
390 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
There are 1 best solutions below
Related Questions in ELEMENTARY-NUMBER-THEORY
- Maximum number of guaranteed coins to get in a "30 coins in 3 boxes" puzzle
- Interesting number theoretical game
- How do I show that if $\boldsymbol{a_1 a_2 a_3\cdots a_n \mid k}$ then each variable divides $\boldsymbol k $?
- Using only the digits 2,3,9, how many six-digit numbers can be formed which are divisible by 6?
- Algebra Proof including relative primes.
- How do I show that any natural number of this expression is a natural linear combination?
- Counting the number of solutions of the congruence $x^k\equiv h$ (mod q)
- algebraic integers of $x^4 -10x^2 +1$
- What exactly is the definition of Carmichael numbers?
- Number of divisors 888,888.
Related Questions in PRIME-NUMBERS
- New prime number
- Confirmation of Proof: $\forall n \in \mathbb{N}, \ \pi (n) \geqslant \frac{\log n}{2\log 2}$
- How do I prove this question involving primes?
- What exactly is the definition of Carmichael numbers?
- I'm having a problem interpreting and starting this problem with primes.
- Decimal expansion of $\frac{1}{p}$: what is its period?
- Multiplying prime numbers
- Find the number of relatively prime numbers from $10$ to $100$
- A congruence with the Euler's totient function and sum of divisors function
- Squares of two coprime numbers
Related Questions in QUADRATICS
- Do you have to complete the square before using the quadratic formula?
- Roots of the quadratic eqn
- Questions on positivity of quadratic form with orthogonal constraints
- Conjugate quadratic equations
- Do Irrational Conjugates always come in pairs?
- Quadratic Equations and their roots.
- Solving a quadratic equation with square root constants.
- What would the roots be for this quadratic equation $f(x)=2x^2-6x-8$?
- Polynomial Equation Problem with Complex Roots
- Solve $\sin^{-1}x+\sin^{-1}(1-x)=\cos^{-1}x$ and avoid extra solutions while squaring
Trending Questions
- Induction on the number of equations
- How to convince a math teacher of this simple and obvious fact?
- Find $E[XY|Y+Z=1 ]$
- Refuting the Anti-Cantor Cranks
- What are imaginary numbers?
- Determine the adjoint of $\tilde Q(x)$ for $\tilde Q(x)u:=(Qu)(x)$ where $Q:U→L^2(Ω,ℝ^d$ is a Hilbert-Schmidt operator and $U$ is a Hilbert space
- Why does this innovative method of subtraction from a third grader always work?
- How do we know that the number $1$ is not equal to the number $-1$?
- What are the Implications of having VΩ as a model for a theory?
- Defining a Galois Field based on primitive element versus polynomial?
- Can't find the relationship between two columns of numbers. Please Help
- Is computer science a branch of mathematics?
- Is there a bijection of $\mathbb{R}^n$ with itself such that the forward map is connected but the inverse is not?
- Identification of a quadrilateral as a trapezoid, rectangle, or square
- Generator of inertia group in function field extension
Popular # Hahtags
second-order-logic
numerical-methods
puzzle
logic
probability
number-theory
winding-number
real-analysis
integration
calculus
complex-analysis
sequences-and-series
proof-writing
set-theory
functions
homotopy-theory
elementary-number-theory
ordinary-differential-equations
circles
derivatives
game-theory
definite-integrals
elementary-set-theory
limits
multivariable-calculus
geometry
algebraic-number-theory
proof-verification
partial-derivative
algebra-precalculus
Popular Questions
- What is the integral of 1/x?
- How many squares actually ARE in this picture? Is this a trick question with no right answer?
- Is a matrix multiplied with its transpose something special?
- What is the difference between independent and mutually exclusive events?
- Visually stunning math concepts which are easy to explain
- taylor series of $\ln(1+x)$?
- How to tell if a set of vectors spans a space?
- Calculus question taking derivative to find horizontal tangent line
- How to determine if a function is one-to-one?
- Determine if vectors are linearly independent
- What does it mean to have a determinant equal to zero?
- Is this Batman equation for real?
- How to find perpendicular vector to another vector?
- How to find mean and median from histogram
- How many sides does a circle have?
The integers modulo a prime $p$, denoted ${\bf Z}/p{\bf Z}$, form a finite field (and to emphasize this it is also often denoted ${\bf F}_p$). Here, a quadratic $ax^2+bx+c$ has one root iff it has two roots (given one root, the other one can be computed as $b/a$ minus the first one).
The quadratic formula actually holds when $p\ne2$. Recall $\Delta=b^2-4ac$ is the discriminant.
$$au^2+bu+c=0\iff u=\frac{-b\pm\sqrt{\Delta}}{2a}.$$
Technically, $\sqrt{\Delta}$ by itself is ambiguous (it doesn't specify which square root), but with the $\pm$ there it should no longer matter. Thus, $ax^2+bx+c$ has a solution if and only if $\Delta$ is a square mod $p$, also known as a quadratic residue, which for $p\nmid\Delta$ can be expressed with the Legendre symbol
$$\left(\frac{\Delta}{p}\right)=1.$$
If you were going to do this for a specific $p$, you'd pick a residue of $\Delta$ mod $p$ and factor, then use multiplicativity. In general though you are correct that we need to factor $\Delta$ itself into a product of prime powers and $\pm1$. We can discard any squares that divide $\Delta$, so let $\Delta'$ be the radical of $\Delta$, and
$$\left(\frac{\Delta}{p}\right)=\left(\frac{\Delta' k^2}{p}\right)=\left(\frac{\Delta'}{p}\right)\left(\frac{k^2}{p}\right)=\left(\frac{\Delta'}{p}\right).$$
Thus it suffices to analyze $\Delta'$. In general, you need to look at the factorization of $\Delta'$ and invoke quadratic reciprocity, paying special care to $\Delta'$ being negative (I see this is what you were saying in the comments) and if it is even or odd.
Example: $\Delta'=-130$. For $p\ne 2,5,13$ we have $\displaystyle\left(\frac{\Delta}{p}\right)=1$ iff
$$1=\left(\frac{-1}{p}\right)\left(\frac{2}{p}\right)\left(\frac{5}{p}\right)\left(\frac{13}{p}\right)\iff (-1)^{\Large \frac{p-1}{2}+\frac{p^2-1}{8}+\frac{5-1}{2}\frac{p-1}{2}+\frac{13-1}{2}\frac{p-1}{2}}=\left(\frac{p}{5}\right)\left(\frac{p}{13}\right).$$
The mod $8$ residues for which the power of $-1$ above yields $1$ are $p\equiv1,3$. The quadratic residues mod $5$ are $\pm1$, and the quadratic residues mod $13$ are $\pm1,\pm3,\pm4$. Therefore,
$$p\equiv\begin{cases} 1,3~(8) \\ \pm1~(5) \\ \pm1,\pm3,\pm4~(13)\end{cases}~{\rm or}~\begin{cases}1,3~(8) \\ \pm2~(5) \\ \pm 2,\pm5,\pm6~(13)\end{cases}~{\rm or}~\begin{cases}5,7~(8) \\ \pm1~(5) \\ \pm2,\pm5,\pm6~(13)\end{cases}~{\rm or}~\begin{cases}5,7~(8) \\ \pm2~(5) \\ \pm1,\pm3,\pm4~(13)\end{cases} $$
One may combine via Sun-Ze (aka Chinese Remainder Theorem) to find all $4\cdot2\cdot2\cdot6=96$ residues $r$ mod $2^3\cdot5\cdot13=520$ such that $p\equiv r~(520)$ implies $ax^2+bx+c$ has roots mod $p$, and the only exceptional cases not covered by these residues are $p=2,5,13$. ($\Delta\equiv0$ is a square mod $p$ so there is a root in those few cases.)