A positive integer *n* is said to be **congruent** if there exists a right triangle with area *n* such that the length of all three sides is rational.

You could always choose one leg to have length *n* and the other to have length 2. Such a triangle would have area *n* and *two* rational sides, but in general the hypotenuse would not be rational.

The smallest congruent number is 5. You can verify that 5 is congruent because the triangle with legs 20/3 and 3/2 has hypotenuse 41/6 and area 5. You can find a list of congruent numbers in OEIS A003273.

You can show that a number is congruent by demonstrating a rational right triangle with the specified area, as with 5 above. Showing that a number is *not* congruent is harder. How do you know you haven’t looked long enough?

There’s no simple classification of congruent numbers, but there are partial results. Jerrold Tunnell proved [1] a way to show that a number is not congruent.

It suffices to look at square-free numbers, numbers not divisible by the square of an integer. This is because if *n* = *mk*² then *n* is congruent if and only if *m* is.

Tunnell gives two necessary conditions for whether a square-free number *n* is congruent: one for the case of *n* odd and one for the case of *n* even.

Because Tunnell’s theorem gives necessary conditions, it can only prove that a number is *not* congruent.

It would be tidy if Tunnell’s conditions were also sufficient, i.e. that they could prove that a number *is* congruent. And they may be sufficient. Tunnell proved that if the **Birch and Swinnerton-Dyer conjecture** is true, then the converse of his theorem is true. If you could prove that the Birch and Swinnerton-Dyer conjecture, you could prove the converse of Tunnell’s theorem as a corollary. You could also win a million dollar prize.

Now for Tunnell’s conditions. If an odd square-free positive integer *n* is congruent, then there are twice as many integer solutions to

2*x*² + *y*² + 8*z*² = *n*

as

2*x*² + *y*² + 32*z*² = *n*.

And if *n* is even and square free, there are twice as many solutions to

4*x*² + *y*² + 8*z*² = *n*

as

4*x*² + *y*² + 32*z*² = *n*.

In general it’s hard to know how many integer solutions an equation has, but for the equations above we can find the solutions by brute force because all the terms are positive. We know each variable is between -√*n* and √*n*. We could even be more efficient and check smaller ranges of *x* and *z* because of the coefficients. And we can *mostly *look for solutions in the first quadrants and multiply by 8, but we need to be careful not to count solutions with zero components more than once.

Let’s prove that 11 is not a congruent number.

How many solutions to

2*x*² + *y*² + 8*z*² = 11

are there?

Clearly *z* can only possibly be ±1 or 0. If z = ±1 then *x* = ±1 and *y* = ±1. If *z* = 0 then the only solutions are *x* = ±1 and *y* = ±3. So we have 14 solutions: eight of the form (±1, ±1, ±1) and two of the form (±1, ±3, 0).

For the equation

2*x*² + *y*² + 32*z*² = 11

*z* must be 0, and so we have the eight solutions we found before: all combinations of (±1, ±3, 0).

Our first equation has 14 solutions and the second has 4, and so 11 must not be congruent.

[1] Tunnell, Jerrold B. (1983), “A classical Diophantine problem and modular forms of weight 3/2”, Inventiones Mathematicae, 72 (2): 323–334, doi:10.1007/BF01389327

Is there anything more required for the Tunnell conditions?

e.g. if n = 5, then there are no solutions to 2x² + y² + 8z² = n and also no solutions to 2x² + y² + 32z² = n, which all seems reasonable. Double zero is zero, so that says that 5 is congruent.

But if n = 2, there are also no solutions to 4x² + y² + 8z² = n and 4x² + y² + 32z² = n, so that would say that 2 is congruent too, which doesn’t seem to be correct.