# Integral solution given $x^2-dy^2 \equiv 1\pmod p$

It's given ($p$ is a prime): $$x^2-dy^2 \equiv 1\pmod p$$ Using only this can we say $$x^2-dy^2 = 1$$ has always integral solution?

-
What is your quantifier? "For all primes p" or "For some prime p" ? – Nate Iverson Jun 28 '12 at 13:02
Assuming $d$ is a given integer and $x,y$ are unknown then $x^2-dy^2=1$ always has an integral solution, namely, $x=\pm1$, $y=0$. If $d$ is a square, that's the only solution. If $d\gt1$ is not a square, this is Pell's equation, and it is guaranteed to have infinitely many solutions. – Gerry Myerson Jun 28 '12 at 13:24
I do not understand the question. If it is from a book or notes, perhaps you could give more detail. – André Nicolas Jun 28 '12 at 17:59

If $=1 \pmod p$ actually means $\equiv \pmod p$,
$\implies x^2-1 \equiv dy^2 \pmod p$
Observe that if $p$ |LHS, $x≡±1 \pmod p$, then $p|dy^2$.
1. if $p∤d$ i.e., $(p,d)=1, p|y$ for accepting solution.
2. if $p|d$, any integral $y$ will give us integral solution.