Can anyone solve this Pell equation

elementary-number-theorypell-type-equations

I have solved the Pell equation $ p^2 – 95 q^2 =1$ . By looking at the convergents corresponding to the simple continued fraction of $\sqrt{95}$ I was able to find the fundamental solution $p=39$ and $q=4$ .
I found the five smallest pairs of positive integers $p,q$ that satisfy the above Pell equation. They are : $$\begin{align*} p=39 \quad& q=4 \\
p=3041 \quad&q=312\\
p=237159 \quad& q=24332 \\
p=18495361\quad& q=1897584 \\
p=1442400999 \quad& q=147987220 \end{align*}$$

However I am having difficulty solving the related Pell equation $$ p^2 – 95 q^2 =-1 , +1 , -1 , +1 , -1 , +1 , …..$$

The only difference now is that the right hand side of the equation is alternatively $-1$ and $+1$ , instead of just $+1$. One obvious trivial solution is $p=1$ and $q=0$ , or $p= \sqrt{-1}$ and $q=0$ but these trivial solutions do not count.

I am trying to find the five smallest pairs of positive integers $ p,q$ that satisfy this equation. I would appreciate your help.

Best Answer

There are no solutions to $p^2-95q^2=-1$, because they would imply $p^2\equiv-1\bmod95$, which would imply $p^2\equiv-1\bmod19$, and there are no solutions to $p^2\equiv-1\bmod19$, because there are no solutions to $p^2\equiv-1\bmod n$ for prime $n\equiv-1\bmod4.$

Related Question