The fact that there are $\dfrac{p+1}{2}$ quadratic residues seem to me to help solving the question, but I don't know how to go on from that point. Could you give me any hint?
-
Yes, $m$ and $n$ are any integers which satisfy $(m,p)=(n,p)=1$. – Math.StackExchange Jun 07 '14 at 05:30
-
I will rewrite the question to make it clear. I'm sorry! – Math.StackExchange Jun 07 '14 at 05:33
-
1I answered this before, here – Sungjin Kim Jun 07 '14 at 05:37
-
I think the post on the link only deals with the case of $c=1$. – Math.StackExchange Jun 07 '14 at 05:42
-
1If $c\not\equiv0,1$ then multiply by $c^{-1}$. Handle $c\equiv0$ separately. – anon Jun 07 '14 at 05:44
-
I got it! Thanks both of you! – Math.StackExchange Jun 07 '14 at 05:52
-
1This statement is a private more General. Formula more General there http://math.stackexchange.com/questions/794510/curves-triangular-numbers – individ Jun 07 '14 at 12:01
-
http://math.stackexchange.com/questions/398200/the-number-of-solutions-of-ax2by2-equiv-1-pmodp-is-p-frac-abp/398245#398245 is valid for odd primes only. The special case $p = 2$ is easy to prove, however. – user0 Feb 05 '17 at 16:02
1 Answers
This is Problem 7 in Section 4.5, "Combinatorial Number Theory," of I. Niven, H. S. Zuckerman, H. L. Montgomery, An Introduction to the Theory of Numbers, 5th ed., Wiley (New York), 1991. I will assume that you are familiar with the material in the book that precedes that problem, namely,
For all $a$ such that $(a, p) = 1$, $a$ is called a quadratic residue modulo $p$ if the congruence $x^2 \equiv a \pmod p$ has a solution. If it has no solution, then $a$ is called a quadratic nonresidue modulo $p$.
For an odd prime $p$, among the $p$ integers modulo $p$, there are $(p - 1)/2$ quadratic residues, $(p - 1)/2$ quadratic nonresidues; the remaining integer is $0 \pmod p$, which makes the congruence solvable but is not called a quadratic residue because $(0, p) = p \not\equiv 1 \pmod p$.
Try to solve the problem yourself reading just enough of this answer to get started. Maybe the two items above suffice.
In the following, we assume congruences and $a, b, c, x, y$ to be modulo $p$.
If $c \equiv 0$, then $(x, y) = (0, 0)$ is a solution. So assume $c \not\equiv 0$ for the remainder of this answer.
If $p = 2$, then $a$, $b$, and $c$ are each congruent to $1$, and $(x, y) = (0, 1)$ is a solution. So assume $p$ is odd for the remainder of this answer.
Rewrite the congruence as $x^2 \equiv \bar{a}c - \bar{a}by^2$ where $\bar{a}a \equiv 1$. If $\bar{a}c$ is a quadratic residue, then put $y = 0$ so that $x^2 \equiv \bar{a}c$ has a solution.
If $\bar{a}c$ is a quadratic nonresidue, then let $y$ run through the $p - 1$ nonzero integers modulo $p$ so that $y^2$ runs through the $(p - 1)/2$ quadratic residues, and, in turn, $\bar{a}c - \bar{a}by^2$ takes on $(p - 1)/2$ distinct values. Because $\bar{a}by^2 \not\equiv 0$, $\bar{a}c - \bar{a}by^2$ is not congruent to the quadratic nonresidue $\bar{a}c$, so the $(p - 1)/2$ values of $\bar{a}c - \bar{a}by^2$ can take on at most $(p - 1)/2 - 1$ quadratic nonresidues; hence at least one value of $\bar{a}c - \bar{a}by^2$ must be congruent to a quadratic residue or $0$, which makes the congruence solvable.
Thus, for all cases, $ax^2 + by^2 \equiv c$ is solvable.
- 3,247