Prove that if $x \equiv 5 \pmod{10}$, then $y \equiv 0 \pmod{7}$ 
Let $x,y$ be positive integers satisfying $2x^2-y^2 = 1$. Prove that if $x \equiv 5 \pmod{10}$, then $y \equiv 0 \pmod{7}$.

I wasn't sure how to use the fact that $x,y$ are positive integers satisfying $2x^2-y^2 = 1$. We could use the theory of Pell's equations to find the solutions, but that would get complicated. Is there a simpler way?
 A: The solutions of this Pell equation are 
$$ \pmatrix{x_n\cr y_n\cr} = \pmatrix{ 3 & 2\cr 4 & 3\cr}^n \pmatrix{1\cr 1\cr} $$
for nonnegative integers $n$.  If $M = \pmatrix{3 & 2\cr 4 & 3\cr}$, we have
$M^6 \equiv I \mod 70$. Thus $(x_n, y_n) \mod 70$ (and therefore mod $10$ and mod $7$) is periodic with period $6$.  We find that $x_n \equiv 5 \mod 10$ for $n = 1$ and $4$, and therefore whenever $n \equiv 1$ or $4 \mod 6$.  For those $n$ we find $y_n \equiv 0 \mod 7$.
A: If $(x,y)$ is a solution of $2x^2-y^2=1$ such that $x>5$, $y>0$ and $x\equiv 5(10)$ then
$$(x',y')=(99 x-70 y,-140 x+99 y)$$
is also a solution with $0<x'<x$ , $x' \equiv 5(10)$, and $y' \equiv y(7)$
The process of repeatedly applying this transformation to a solution $(x,y)$ will stop at the solution $(5,7)$ thereby proving the result
It easy to check that $(x',y')$ is a solution. Next
$$x\sqrt{2}-y=\frac{1}{x\sqrt{2}+y}<\frac{1}{5\sqrt{2}}$$
gives, after some algebra,
$$10 y> 10\sqrt{2}x-\sqrt{2} > 14x$$
the last inequality is true since $x\geq  10$
Therefore $99x-70y<x$
Also, $x\sqrt{2}-y>0$ gives $99x-70y>0$
Finally,
$$99 x-70 y\equiv 99*5\equiv 5(10)$$
and
$$-140 x+99 y\equiv y(7)$$
