# Abstract Nonsense

## Simple, Yet Rewarding, Diophantine Equation

Point of post: Often in mathematics it is enjoyable to solve simple problems in fields outside of one’s comfort zone, especially one’s that occur with uncanny frequency in real life (and by real life I mean when people studying undergraduate algebra ask you how to solve them haha). The one I have in mind is solving the basic Diophantine Equation

$x^2-y^2=2p\quad p\text{ prime}$

The Problem

In this first part of the post we will give several proofs that the only solution to $(1)$ is $(x,y,p)=( 2,0,\pm 2)$.

Proof (1): We first see that it is sufficient to solve this for $x,y\in\mathbb{N}\cup\{0\}$ since $(x,y,p)$ is a solution if and only if $(\pm x,\pm y,p)$ is a solution. So note that

$(x-y)(x+y)=x^2-y^2=2p$

implies that $x-y\mid 2p$ and $x+y\mid 2p$. Thus, we have that $x-y$ is equal to either $1$, $2$, $p$, or $2p$ and similarly for $x+y$. So, we consider the table

$\begin{array}{c|cccc} & 1 & 2 & p & 2p\\ \hline 1& 1 & 2 & p & 2p\\ 2 & 2 & 4 & 2p & 4p\\ p & p & 2p & p^2 & 2p^2\\ 2p & 2p & 4p & 2p^2 & 4p^2\end{array}$

where the column represents the values of $x-y$ and the horizontal the values of $x+y$. So considering that $(x-y)(x+y)=2p$ we see that  the only possibilities are

$\left\{\begin{array}{c} x-y=2\\ x+y=2\end{array}\right\},\text{ }\left\{\begin{array}{c} x-y=p\\ x+y=p\end{array}\right\},\text{ }\left\{\begin{array}{c}x-y=2\\ x+y=p\end{array}\right\},\text{ }\left\{\begin{array}{c} x-y=p\\ x+y=2\end{array}\right\},\text{ }\left\{\begin{array}{c}x-y=1\\ x+y=2p\end{array}\right\},\text{ }\left\{\begin{array}{c}x-y=2p\\ x+y=1\end{array}\right\}$

Where we’ve included the first two since there is no reason that $2p$ can’t be $2\cdot 2$ or $p^2$. But, if either of these are true we see that $p=2$, and so we’ll consider the solution to $x^2-y^2=4$ later. But, we also see that both the third and fourth set of equations imply that $p=2$ since adding the equations in both systems gives

$2x=p+2\implies 2\mid p\implies p=2$

since the only even prime is $2$. Lastly, we see that the last two are impossible since in both cases adding the equations in the system gives

$2x=2p+1$

which is impossible. Thus, on all counts we see that it must be true that $p=2$. So, the only equation of the form $(1)$ with possible solutions is $x^2-y^2=4$. To solve this we notice once again that the equation implies that $x-y\mid 4$ and $x+y\mid 4$ so that $x-y=1,2,4$ and $x+y=1,2,4$. So, drawing up a multiplication table again gives us that

$\begin{array}{c|ccc} & 1 & 2 & 4\\ \hline 1& 1 & 2 & 4\\ 2 & 2 & 4 & 8\\ 4 & 4 & 8 & 16\end{array}$

Thus, the only possibilities are

$\left\{\begin{array}{c}x-y=2\\ x+y=2\end{array}\right\},\text{ }\left\{\begin{array}{c} x-y=4\\ x+y=1\end{array}\right\},\text{ }\left\{\begin{array}{c} x-y=1\\ x+y=4\end{array}\right\}$

The first has the trivial solution $x=2$ and the last two are impossible since addition of the equations in each system gives

$2x=5$

Thus, after all of this work we have conclude that the only prime for which an equation of the form $(1)$ has solutions is $(1)$ and the solutions to $x^2-y^2=4$ are $x=2,y=0$. Thus, it follows that the solutions of $(1)$ are

$(x,y,p)=(2,0,\pm 2)$

$\blacksquare$

Proof (2): We first note that in $\mathbb{Z}_2\oplus\mathbb{Z}_2$ the following table holds

$\begin{array}{c|c}(x,y) & x^2-y^2\\ \hline (0,0) & 0\\ (1,0) & 1\\ (0,1) & 1\\ (1,1) & 0\end{array}$

So that $x^2-y^2$ is even precisely when $x$ and $y$ have the same parity. So, we consider equation $(1)$ when $x$ and $y$ are both even, or both odd separately.

First suppose that $x=2n$ and $y=2m$  then equation $(1)$ may be rewritten as

$4m^2-4n^2=2p$

But, this clearly implies that $2\mid p$ so that $p=2$. Now, suppose that $x=2m+1$ and $y=2n+1$ then equation $(1)$ may be written as

$2p=(2m+1)^2-(2n+1)^2=4m^2+4m-4n^2-4n$

which also implies that $2\mid p$ so that $p=2$. It follows that if $(1)$ has a solution then $p=2$. Thus, solving $(1)$ reduces to solving $x^2-y^2=4$. But, this was done in the last proof so that we may conclude that $(1)$ has precisely the solutions $(x,y,p)=(2,0,\pm 2)$. $\blacksquare$.