Class Number Calculation of a Real Quadratic Number Field I am looking at the example below. Can anyone explain how they end up with the contradiction. Why do they reduce $a^2-65b^2$ modulo $5$ to show that it has no integer solutions?


It's mostly a matter of efficiency. Try it modulo 65. Obviously $65b^2 \equiv 0 \pmod{65}$. So we need to look just at $a^2 \pmod{65}$. But we need to look at 65 values: 0, 1, 4, 9, 16, 25, 36, 49, 64, 16, 35, 56, 14, 39, 1, 30, 61, 29, 64, 36, 10, 51, 29, 9, 56, 40, 26, 14, 4, 61, 55, 51, 49, 49, 51, 55, 61, 4, 14, 26, 40, 56, 9, 29, 51, 10, 36, 64, 29, 61, 30, 1, 39, 14, 56, 35, 16, 64, 49, 36, 25, 16, 9, 4, 1.
If instead we look at it modulo 5, it still zeroes out $65b^2$ but we only have five values of $a^2$ to worry about, namely 0, 1, 4, 4, 1. It is much easier to see that $\pm 2$, $\pm 8$ don't occur here.
