TITLE: Is there any pythagorean triple (a,b,c) such that $a^2 \equiv 1 \bmod b^{2}$
QUESTION [14 upvotes]: ... or equivalently, is there a $D$, such that $a^2 - Db^2 = 1$
All I managed to do is to use the Euclid's formula
$a = m^2 - n^2,\ b = 2mn$ to test for all $m,n$ between 1 and 3000.

REPLY [3 votes]: Since it is considered good practice not to leave answers buried in comments, I thought it would be good to paste the relevant comments together and take the question off the unanswered list. 
We are seeking positive integers $a, b, c, D$ that solve $a^2 - D b^2 = 1$ and $a^2 + b^2 = c^2$. Subtracting the second equation from the first, $b^2(-D-1) = 1 - c^2$ or $c^2 - (D+1)b^2 = 1$. However, the pair of equations 
$$a^2 - D b^2 = 1$$ 
$$c^2 - (D+1)b^2 = 1$$ 
has no pair of solutions, according to the last line of the statement of Theorem 1.1 from this paper: 

Michael A. Bennett and Gary Walsh, Simultaneous quadratic equations with few or no solutions, Indag. Math. (New Series) 11-(1), March 2000, 1-12.