2

I am working on a problem and while trying to make some progress, I stumbled across a sub-question.

When does $x^2-2y^2 = n$ NOT have infinite solutions for some positive integer $n$.

Now I tried to make some progress with help of a professor. I stumbled across the idea that if I take mod n I get $x^2 \equiv 2 y^2 \pmod N.$ Then if $y$ is relatively prime to $N$ I can multiply by the inverse of $y^2$ and that gives me $(xy^{-1})^2 \equiv 2 \pmod{n}.$ So, $2$ has to be a quadratic residue mod n. I don't know whether this helps though because, for example $2$ is not a qudratic residue mod $9$ but $x^2-2y^2 = 9$ does have infinite solutions.

I hope you guys can come up with some helpful ideas. Thanks!

J. W. Tanner
  • 60,406
  • If there is any solution there are infinitely many: if $x^2 - 2 y^2 = n,$ as $ (3x-4y)^2 - 2(2x-3y)^2 = n,$ repeat as needed – Will Jagy Jun 19 '21 at 20:50
  • 3
    a number $n$ can be expressed if and only if the exponent of prime $q |n$ is even, whenever $q \equiv \pm 3 \pmod 8.$ Things that do not matter: $\pm$ signs, exponent of $2$ when factoring $n,$ exponent of any prime $p \equiv \pm 1 \pmod 8.$ – Will Jagy Jun 19 '21 at 21:15
  • @Prathmesh FYI, with the post Integer solutions for $x^2-2y^2=10$, there's a comment which states there are no solutions modulo 16, which is what my now deleted answer also showed. Another post showing other examples of $n$ with no solutions is $x^2-2y^2=8k+1$. A closely related post, that might also be useful, is Small integral representation as $x^2-2y^2$ in Pell's equation. – John Omielan Jun 19 '21 at 23:24
  • @WillJagy I removed my vote to close as a duplicate since I believe I misread the question. It's asking to specify all such $n$ where there aren't an infinite number of solutions while my proposed duplicate, along with the other ones I proposed (all now listed in my later comment) only dealt with certain special cases. Instead, I believe you can provide a good answer by using and expanding on (in particular, proving what you wrote in your second comment) your comments. – John Omielan Jun 20 '21 at 01:11
  • 1
    @JohnOmielan I've put part of it as an answer. I think I will wait on feedback from the OP. It is all pretty basic, though – Will Jagy Jun 20 '21 at 03:08
  • 1
    WTF is an infinite solution? I thought a solutions have to be integers, i.e. finite numbers. – bof Jun 20 '21 at 03:46
  • 1
    @WillJagy Thank you for providing an answer. Although it is "all pretty basic" to you, it's not to many other people, including possibly the OP. The important thing is that it could, and hopefully will, help the OP to solve the problem. – John Omielan Jun 20 '21 at 04:52
  • 1
    Thank you all so much for your help! I will take a look at all the comments and see what I can do and apply it to my original problem. – Prathmesh Jun 20 '21 at 19:37
  • Prathmesh, the thing you might be able to do yourself is a simple formula, if $x^2 - 2 y^2 = n$ and $u^2 - 2 v^2 = m,$ then there are (explicit) numbers $z,w$ with $z^2 - 2 w^2 = nm.$ More difficult, but true, is that every prime $p \equiv \pm 1 \pmod 8$ can be expressed in integers as $r^2 - 2 s^2 = p,$ for example $3^2 - 2 \cdot 1^2 = 7, ; ; ; $ $5^2 - 2 \cdot 2^2 = 17, ; ; ; $ $5^2 - 2 \cdot 1^2 = 23, ; ; ; $ – Will Jagy Jun 20 '21 at 20:40
  • 1
    Alright, in Buell, Binary Quadratic Forms, Theorem 4.23 on page 74, says that a prime $p$ with Legendre $(\Delta|p)=1$ is represented by some form of that discriminant. Everything I would put in a complete answer is on pages 74-75, except for the proof that the form class number $h(8) = 1 ; . ; ; ;$ Finding all forms of a (positive nonsquare) discriminant is in http://zakuski.utsa.edu/~jagy/indefinite_binary_Buell.pdf – Will Jagy Jun 20 '21 at 21:09

1 Answers1

3

ummmm. $2$ is a quadratic residue $\mod p$ when prime $ p \equiv \pm 1 \pmod 8$
On the other hand, $2$ is a quadratic nonresidue $\mod q$ when prime $ q \equiv \pm 3 \pmod 8$

From the Lemma below, if prime $ q \equiv \pm 3 \pmod 8$ and $ x^2 - 2 y^2 \equiv 0 \pmod q,$ then both $x,y$ are divisible by $q$ and $x^2 - 2 y^2$ is diviaible by $q^2.$ Indeed, if we find the complete prime factorization of $x^2 - 2 y^2,$ the exponent of any prime $ q \equiv \pm 3 \pmod 8$ is EVEN

LEMMA Given a binary quadratic form $$ f(x,y) = a x^2 + b xy+ c y^2 $$ with $a,b,c$ integers. Given $$ \Delta = b^2 - 4 a c, $$ where we require that $\Delta,$ if non-negative, is not a square (so also $\Delta \neq 0,1$).

Proposition: given an odd prime $q$ such that $q$ does not divide $\Delta$ and, in fact, $$ (\Delta| q) = -1, $$ whenever $$ f(x,y) \equiv 0 \pmod q, $$ then BOTH $$ x \equiv 0 \pmod q, \; \; \; \; \; y \equiv 0 \pmod q. $$

Proof: the integers taken $\pmod q$ form a field; every nonzero element has a multiplicative inverse. If either $a,c$ were divisible by $q,$ we would have $\Delta $ equivalent to $b^2$ mod $q,$ which would cause $(\Delta|q)$ to be $1$ rather than $-1.$ As a result, neither $a$ nor $c$ is divisible by $q.$

Next, $q$ is odd, so that $2$ and $4$ have multiplicative inverses mod $q,$ they are non zero in the field. Put togethaer, $$4a \neq 0 \pmod q$$

Now, complete the square: $$ a x^2 + b xy+ c y^2 \equiv 0 \pmod q $$ if and only if $$ 4a(a x^2 + b xy+ c y^2) \equiv 0 \pmod q, $$ $$ 4a^2 x^2 + 4abxy + 4ac y^2 \equiv 0 \pmod q, $$ $$ 4a^2 x^2 + 4abxy + (b^2 y^2 - b^2 y^2) + 4ac y^2 \equiv 0 \pmod q, $$ $$ 4a^2 x^2 + 4abxy + b^2 y^2 - (b^2 y^2 - 4ac y^2) \equiv 0 \pmod q, $$ $$ (4a^2 x^2 + 4abxy + b^2 y^2) - (b^2 - 4ac) y^2 \equiv 0 \pmod q, $$ $$ (2ax + by)^2 - (b^2 - 4ac) y^2 \equiv 0 \pmod q, $$ $$ (2ax + by)^2 - \Delta y^2 \equiv 0 \pmod q, $$ $$ (2ax + by)^2 \equiv \Delta y^2 \pmod q. $$

Now, ASSUME that $y \neq 0 \pmod q.$ Then $y$ has a multiplicative inverse which we are allowed to call $1/y,$ and we have $$ \frac{(2ax + by)^2}{y^2} \equiv \Delta \pmod q, $$ $$ \left( \frac{2ax + by}{y} \right)^2 \equiv \Delta \pmod q. $$ However, the HYPOTHESIS that $ (\Delta| q) = -1 $ says that this is impossible, thus contradicting the assumption that $y \neq 0 \pmod q.$

So, in fact, $y \equiv 0 \pmod q.$ The original equation now reads $$ a x^2 \equiv 0 \pmod q $$ with the knowledge that $a \neq 0 \pmod q,$ so we also get $$ x \equiv 0 \pmod q, \; \; \; \; \; y \equiv 0 \pmod q. $$ $$ \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc $$

Will Jagy
  • 139,541