Elementary Methods in Number Theory Exercise 1.4.11

The prime numbers $p$ and $q$ are called twin primes if $|p-q|=2$.Let $p$ and $q$ be primes.Prove that $pq+1$ is a square if and only if $p$ and $q$ are twin primes.


Proof:$\Leftarrow:$When $p$ and $q$ are twin primes,without the loss of generality,let $p-q=2$.Then
\begin{equation}
pq+1=q(q+2)+1=q^2+2q+1=(q+1)^2
\end{equation}
$\Rightarrow:$Without the loss of generality,let $p\geq q$.
\begin{equation}
pq+1=t^2(t\in\mathbf{N}^{+})
\end{equation}
So
\begin{equation}
pq=(t+1)(t-1)
\end{equation}
So
\begin{align*}
\begin{cases}
p=t+1\\
q=t-1\\
\end{cases}
\end{align*}(In this case,$p-q=2$)
or
\begin{align*}
\begin{cases}
pq=t+1\\
1=t-1\\
\end{cases}
\end{align*}(In this case,$t=2$,then $pq=3$,so $p=3,q=1$,then $p-q=2$)

原文地址:https://www.cnblogs.com/yeluqing/p/3828054.html