For which primes $p$ does $px^2-2y^2=1$ have a solution?

156 Views Asked by At

Let $p$ be an odd prime. If $px^2-2y^2=1$ is solvable, we can get Jacobi symbol $(\frac{-2}{p})=1$, so $p=8k+1,8k+3$.
But when $k=12$, $p=97$, the Pell equation $97x^2-2y^2=1$ is unsolvable. I think this diophantine equation is unsolvable for many integers. But it satisfies the Jacobi symbol, so my question is for what prime $p$, the diophantine equation $px^2-2y^2=1$ is solvable? What is the necessary and sufficient condition?

1

There are 1 best solutions below

0
On

0: Short answer:

If $\beta\neq 0$ is an integer and $2\beta^2+1=\alpha^2p$ for some integer $\alpha$ and prime $p$, then the equation $$px^2-2y^2=1$$ is solvable and one of the solutions is given by \begin{align*} x&=\alpha\\ y&=\beta \end{align*} This is easily checked: $$px^2-2y^2=p\alpha^2-2\beta^2=2\beta^2+1-2\beta^2=1$$ (Note: The rest are obtained by composition with fundamental solutions.)

Moreover, all solvable primes must occur in such a way. To solve this we can use the representation theorems of Binary Quadratic Forms, which is provided below.

Note: In fact, this parametrized solution is a consequence of the representation theorems. It is not found by random guessing.


1: Binary Quadratic Forms

A binary quadratic form is the quadratic polynomial in two variables $$f(x,y)=ax^2+bxy+cy^2$$ and we usually write $f=(a,b,c)$. The determinant is given as $\Delta=b^2-4ac$.
A form $f(x,y)$ represents an integer $m$ if there exists integers $x_0,y_0$ such that $$f(x_0,y_0)=m$$ We are interested in the representation of $f=1$.


2: Equivalence Class of Binary Quadratic Forms

For any form $f$, the transformation \begin{align*} X &=\alpha x + \beta y\\ Y &= \gamma x + \delta y \end{align*} Results in a new form $F$ $$F(X,Y) = AX^2+BXY+CY^2$$ where \begin{align*} A &= a\alpha^2+b\alpha\gamma+c\gamma^2\\ B &= b(\alpha\delta+\beta\gamma) + 2(a\alpha\beta+c\gamma\delta)\\ C &= a\beta^2+b\beta\delta+c\delta^2 \end{align*} and the new discriminant $D$ becomes $$D = B^2-4AC = (\alpha\delta-\beta\gamma)^2\Delta$$ If $\alpha\delta-\beta\gamma=\pm 1$, then the discriminant does not change. We call two forms $F_1,F_2$ equivalent if they are related by some transformation with $\alpha\delta-\beta\gamma=\pm 1$.

We put equivalent forms into equivalence classes. Note that this means if $F_1,F_2$ are in the same equivalence class, then there is some transformation bringing $F_1$ to $F_2$.


3: Representation of Binary Quadratic Forms

It is known that forms in the same equivalence class represents the same integers. i.e. if $f(x,y)=m$ for some from $f$ then each other form in the same class can also represent $m$.

This is because if an integer $m$ is representable, then there exists a form $(m,B,C)$. Then $(X,Y)=(1,0)$ is a solution. But for any other form, we have transformations $$x=\alpha X+\beta Y$$ $$y=\gamma X+\delta Y$$ so $(x,y)=(\alpha X+\beta Y,\gamma X+\delta Y)$ is a solution for that form.
(Note that this is because they have the same discriminant.)


4: Representation of Binary Quadratic Forms for Prime 2

If an equivalence class has discriminant $\Delta\equiv 0\pmod 8$, then the prime 2 is representable by forms belonging to the classes $(2,0,-\Delta/8)$. (Notice that $(X,Y)=(1,0)$ is a solution.) Moreover, this is the only possible form.
(Coming from Theorem 4.25, "Binary Quadratic Forms" by D. A. Buell.)

i.e. $f(x,y)=2$ if and only if there are integers $$\alpha,\beta,\gamma,\delta\quad \text{ and }\quad \alpha\delta-\beta\gamma=\pm 1$$ which transforms the form $(a,b,c)$ to $(2,0,-\Delta/8)$.


5: Solving The Original Problem

We multiply the equation by 2: $$2px^2-(2y)^2=2$$ Making the substitution $X=x, Y=2y$, we have $$2pX^2-Y^2=2$$ where LHS is the form $f(x,y)=(2p,0,-1)$ with discriminant $$\Delta = 0^2-4(2p)(-1) = 8p\equiv 0\pmod 8$$ Note that if $(X,Y)$ is a solution, then $Y$ must be even and we recover a solution $(x,y)=(X,Y/2)$.

We want to know if $f$ represents the prime 2. Since $\Delta\equiv 0\pmod 8$, by (3), this is only possible if it is in the equivalence class $$(2,0,-\Delta/8)=(2,0,-p)=(A,B,C)$$

Therefore by (2), we can find integers $\alpha,\beta,\gamma,\delta$ satisfying $$\alpha\delta-\beta\gamma=\pm 1$$ such that \begin{align*} 2p\alpha^2-\gamma^2 &= 2\\ 2(2p\alpha\beta-\gamma\delta) &= 0\\ 2p\beta^2-\delta^2 &=-p \end{align*} If $\alpha=0$, then $-\gamma^2=2$
If $\beta=0$, then $-\delta^2=-p$
If $\gamma=0$, then $p\alpha^2=1$
If $\delta=0$, then $2\beta^2=-1$
All these 4 conditions are not possible, hence $\alpha,\beta,\gamma,\delta\neq 0$. Then $$p=\frac{2+\gamma^2}{2\alpha^2}=\frac{\gamma\delta}{2\alpha\beta}=\frac{\delta^2}{2\beta^2+1}$$ Considering last two terms and $\delta\neq 0$: $$\frac{\gamma\delta}{2\alpha\beta}=\frac{\delta^2}{2\beta^2+1}\implies \delta =\frac{\gamma(2\beta^2+1)}{2\alpha\beta}$$ Then taking terms 2 and 3 and substituting $\delta$: \begin{align*} \frac{2+\gamma^2}{2\alpha^2}&=\frac{\gamma}{2\alpha\beta}\frac{\gamma(2\beta^2+1)}{2\alpha\beta}\\ 2\beta^2(2+\gamma^2) &= \gamma^2(2\beta^2+1)\\ \gamma &=\pm 2\beta \end{align*} Now consider $\delta$ again: $$\delta =\frac{\gamma(2\beta^2+1)}{2\alpha\beta}=\frac{\gamma}{2\beta}\frac{(2\beta^2+1)}{\alpha}$$ Since $\gamma=\pm 2\beta$, this tells us that $\alpha \;|\; 2\beta^2+1$.

Therefore this tells us that we can let $\beta\neq 0$ be any integer.
We can find $\gamma$ from $\gamma=\pm 2\beta$.
$\alpha$ can be any divisor of $2\beta^2+1$, then $\delta$ will be $\gamma/(2\beta) \cdot (2\beta^2+1)/\alpha$.

We check that indeed this satisfies the condition $\alpha\delta-\beta\gamma=\pm 1$: $$\alpha\delta-\beta\gamma = \alpha\frac{\gamma(2\beta^2+1)}{2\alpha\beta}-\beta\gamma=\frac{\gamma(2\beta^2+1)-2\beta^2\gamma}{2\beta}=\frac{\gamma}{2\beta}=\pm 1$$ However, there is one last step: this does not ensure that $p$ is a prime.

Note that we have freedom of choice for $\beta$, followed by $\alpha$ which divides $2\beta^2+1$. We get to choose the sign of $\gamma$ too, but it will turn out to be inconsequential. $\delta$ is completely dependent on the rest. Hence the type of primes $p$ possible is completely dependent on the pair $(\alpha,\beta)$.

In practice, we have $$p=\frac{2+\gamma^2}{2\alpha^2}=\frac{2+4\beta^2}{2\alpha^2}=\frac{1+2\beta^2}{\alpha^2}$$ (does not depend on $\gamma,\delta$)

So for a valid prime $\alpha^2\;|\;2\beta^2+1$. Since this means $\alpha\;|\; 2\beta^2+1$, our selection of $\alpha,\beta,\gamma,\delta$ still holds: it does not affect the $\alpha\delta-\beta\gamma=\pm 1$ condition. (We can see that this is a subset of the parameters that work.)

At this point, we are done. Any such prime is representable.
We started by considering all possible $\alpha,\beta,\gamma,\delta$ that solves the equation and satisfies the transformation rule. The only extra step is to find a subset that results in a prime.

So in conclusion, if $\beta$ is an integer such that $2\beta^2+1=\alpha^2p$ for some integer $\alpha^2$ and prime $p$, then the original equation $$px^2-2y^2=1$$ is solvable. Note that a solution here is $(X,Y)=(1,0)$, since the transformed form is $(2,0,-\Delta/8)$. Then the solution to the equation with multiply by 2 is $$(x,y)=(\alpha X+\beta Y,\gamma X+\delta Y)=(\alpha,\gamma)=(\alpha,2\beta)$$ Finally to recover our original equation we take $$(x,y)=(\alpha,2\beta/2)=(\alpha,\beta)$$ This explains how we found the parametrization and why it is the only solution.