I was given this and I could really use some hints. I know that there are no integer solutions to the equation and that I have to factor the left side to get the form $(ax+by)^2$ by multiplying/dividing both sides of the equation and/or perhaps use a prime modulo of some sort so that I get a congruence in the form of $w^2\equiv c$ and then check that c is not a quadratic residue of the modulo and so reach the conclusion that there are no integer solutions to the problem. I have tried modules 3-37 (maybe made some mistakes along the way) and tried diving by 2 and then adding the modulo and haven't gotten even close to the right answer. Perhaps someone could push me toward the right modulo or give me a hint of what to look for.
Find the number of integer solutions of $22x^2-34xy+6y^2=2024$
elementary-number-theoryquadratic-residues
Related Solutions
Your use of Hensel's Lemma works fine, if $b$ is co-prime to $p$. Here is another approach:
Let me deduce the following result without using Hensel's Lemma, but only basic group theory and some element-counting.
Let $p$ be an odd prime and $b$ co-prime to $p$, let $n$ be any integer. Then $x^2=b \pmod {p^n}$ has two solutions of $b$ is a quadratic residue and zero solutions in the other case.
Proof:
$(\mathbb Z/p^n\mathbb Z)^*$ is a cyclic group of even order $N = p^{n-1}(p-1)$, hence it contains exactly one element of order $2$. Thus the kernel of the square map
$$(\mathbb Z/p^n\mathbb Z)^* \to (\mathbb Z/p^n\mathbb Z)^*, x \mapsto x^2$$ consists of two elements. This yields that the equation $x^2=b \pmod {p^n}$ has either two or zero solutions and precisely one half of all choices for $b$ belongs to either case.
Certainly, if $x^2=b \pmod p$ is not solvable, then $x^2=b \pmod {p^n}$ is not solvable for any $n$. Thus we have found $\frac{N}{2}$ choices for $b$ that yield no solutions (The quadratic non-residues). By our arguments above, we deduce that the other $\frac{N}{2}$ choices for $b$ must yield two solutions. These are precisely the quadratic residues modulo $p$.
Let us attack the general case, where $b=up^m$ with $0 \leq m < n$ and $u$ co-prime to $p$: Then you can easily show that $x^2=b \pmod {p^n}$ is solvable iff $x^2=u \pmod {p^n}$ is solvalbe and $m$ is even.
The problem asks to prove that
$$p \gt 2s^2 - s \tag{1}\label{eq1}$$
where $p$ is a prime $\gt 5$, $-1$ is a quadratic residue and $s$ is the smallest non-quadratic residue.
Consider the case where $2$ is not a quadratic residue. Thus, $s = 2$ so $2s^2 - s = 6$, giving that all primes $p \gt 5$ satisfy \eqref{eq1}.
Next, consider $2$ is a quadratic residue, so $s \ge 3$. Also, since $-1$ is also a quadratic residue, this means that so is any $0 \lt n \lt s$ times $p - 1$ as it's the product of $2$ quadratic residues. As such, apart from $p$ itself, all integers from $p - (s - 1)$ to $p + (s - 1)$, inclusive, are quadratic residues. This forms a contiguous range of $2s - 1$. Including $p + s$, this forms a range of $2s$. Similar to what the question suggests, this means there exists an integer $q$ such that $2qs$ is within this range. Note that $2qs = p$ can't be true. Also, if $2qs = p + s$, then $s\left(2q - 1\right) = p$, which can't be the case. As such, we get that
$$p - s \lt 2qs \lt p + s \tag{2}\label{eq2}$$
Since all of the values in this range, apart from $p$, are quadratic residues, then so is $2qs$. Since $2$ is a quadratic residue, but $s$ is not, then $q$ can't be as well. Thus, $q \ge s$. Using this in the right-hand part of \eqref{eq2}, we get
$$p + s \gt 2qs \ge 2s^2 \Rightarrow p \gt 2s^2 - s \tag{3}\label{eq3}$$
As such, \eqref{eq1} is also true in this case.
Best Answer
Multiplying both sides by 6 gives you $(6y-17x)^2-157x^2=12144$.
But quadratic reciprocity gives you $\left(\dfrac{12144}{157}\right)=-1$, so this equation admits no integral solution.