Basics about congruences and "modulo"
Main story: A Trillion Triangles
We say integers a and b are "congruent modulo n" if their difference is a multiple of n. For example, 17 and 5 are congruent modulo 3 because 17 - 5 = 12 = 4⋅3, and 184 and 51 are congruent modulo 19 since 184 - 51 = 133 = 7⋅19. We often write this as 17 ≡ 5 mod 3 or 184 ≡ 51 mod 19. The expression -8 ≡ 10 mod 9 is pronounced "negative 8 is congruent to 10 modulo 9," or sometimes "negative 8 is congruent to 10 mod 9."
A familiar usuage of modular arithmetic is whenever we convert between 12 and 24 hour clocks. We know that 14:00 and 2:00 pm indicate the same time since 14 ≡ 2 mod 12.
Although used less commonly, we can extend this definition to rational numbers. The rational numbers 1/2 and 13/2 are congruent modulo 3 because 13/2 - 1/2 = 6 = 2⋅3.
Why are they called "congruent numbers"?Calling the area of a right triangle with rational sides a "congruent number" can be confusing, because that usage of "congruent" has almost nothing in to do with the standard use of "congruent" as described above. If the terminology was invented today, we would call it something else. Even mathematicians find it confusing: the statement "5 is a congruent number" provokes the reaction "congruent to what?"
But there is one way in which the terms are related, which we now explain.
If n is a congruent number, that is, if it is the area of a right triangle with rational sides, then there exists a rational square a2, such that a2 - n and a2 + n are also squares.
To see this, suppose that x, y, and z are rational sides of a right triangle whose area is n. We know from basic geometry (the Pythagorean theorem) that x2 + y2 = z2 and also from the area condition that xy = 2n. This means
If we let   a2 = z2/4   then   a2 + n = (x+y)2/4   and   a2 - n = (x-y)2/4.
Thus we have found three rational squares all congruent to each other modulo n. The rational squares are more than just congruent. They are actually three adjacent terms,   a2 - n,   a2,   a2 + n,   in an arithmetic progression, that is, a list of numbers whose adjacent terms have a common difference.
By the way, if we can have three squares of the form   a2 - n,   a2,   a2 + n then there is a corresponding right triangle with rational sides and whose area is  n. Just let