• Welcome to the new Internet Infidels Discussion Board, formerly Talk Freethought.

An elegant proof of Fermat's Christmas Theorem

Swammerdami

Squadron Leader
Warning Level 1
Joined
Dec 15, 2017
Messages
5,341
Location
Land of Smiles
Basic Beliefs
pseudo-deism
Wasn't proving Fermat's Little Theorem by counting necklaces really nifty! That's a very well known result -- I think even I discovered the argument many decades ago.

BUT there's another Theorem by Fermat which has an elegant proof based on counting shapes, and that proof was discovered just a few years ago, almost four centuries after the Theorem's discovery. Fermat's "Christmas" Theorem is also a key result in the evolution of number theory. Like much of Fermat's number theory, the first published proof was by Leonhard Euler. This Theorem was voted to be one of the Ten Most Beautiful Theorems of Mathematics in a survey of math teachers. It is also known as the "Fermat's Two Squares Theorem."

The theorem itself is #1:
  1. Any prime of the form (4k+1) can be expressed as the sum of two squares in exactly one way.
  2. Any prime of the form (4k+1) can be expressed as the sum of two squares in an odd number of ways.
  3. Any prime of the form (4k+1) can be expressed as the sum of two squares in at least one way.
  4. Any prime of the form (4k+1) can be expressed as the sum of two squares in at most one way.

Obviously statement #1 -- which is a true statement -- implies #2, #3, #4. I list these weaker versions of the Theorem in case we get tired, and decide to settle for a partial proof! In fact, we WILL get tired, and settle for just proving #2. Note that Zero is not an odd number, so #2 guarantees there will be at least one solution to 4k+1 = a2 + b2 whenever 4k+1 is prime. Search Youtube for "Mathologer windmill" and find a detailed complete proof. In this post I just try to entice you with an elegant counting argument.

The proof is based on Counting windmill shapes. But we needn't actually count the shapes; we simply must note whether the population is odd or even.

What is a "windmill shape"? It is a central square with four paddles attached, all with integer sides. The central square is X×X and each paddle a Y×Z rectangle with Y applying to the side flush with the square. In the image below we see TWO windmills: (X,Y,Z) = (3,7,1) and (X,Y,Z) = (5,1,3). They have the same area: 32 + 4⋅7⋅1 = 52 + 4⋅1⋅3 = 37.

But wait! These two examples are "sort of"(?) the same windmill, or rather they have the same windmill silhouette! There are TWO different ways, depending on how we pick the central square, to get the same windmill silhouette. And there will always be two ways exactly UNLESS X=Y. For the area=37 example, (X,Y,Z) = (1,1,9) is the only special case.

For area=65 there are TWO special cases: (X,Y,Z) = (1,1,16) and (X,Y,Z) = (5,5,2). But we need not worry about THAT. It can arise only because 65 is a multiple of 5, and we are concerned solely with (4k+1) which are prime.

When 4k+1 is prime, only (X,Y,Z) = (1,1,k) will NOT have a pair with the same silhouette. Since all but one are paired off, the number of windmills whose area is prime 4k+1 must be an odd number!

And now comes the step which seems nifty! We've written (4k+1) = X2 = 4⋅Y⋅Z but we are trying to express 4k+1 as the sum of two squares, NOT one square and four rectangles. So we restrict attention to the case Y=Z. Then 4k+1 = X2 + (2Y)2. Voila! Two squares.

So. We have an odd number of windmills and we want to erase all of those with Y≠Z. But (X,Y,Z) and (X,Z,Y) are two DIFFERENT windmills with the same area when Y≠Z. We don't know how many windmills we're erasing, but it will be an even number! An even minus an odd is an odd number.
Q.E.D.

christm.jpg
 
There are some general theorems that one can prove about integers that are sums of squares of two integers.

Their product is also the sum of squares:
(a^2 + b^2) * (c^2 + d^2) = (a*c+b*d)^2 + (a*d-b*c)^2 = (a*d+b*c)^2 - (a*c-b*d)^2
It goes back to Diophantus's book Arithmetica, so it might be called the Diophantus-Brahmagupta-Fibonacci identity.

Thus, the set of these integers is closed under multiplication.

Another result can be obtained with modular arithmetic, in particular, doing modulo 4.

Squares: 0: 0, 1: 1, 2: 0, 3: 1
Sums of squares: 0, 1, 2

This means that the only numbers decomposable in this fashion are 4^(power)*(odd), 2*(odd), and (odd: 4k+1)

There are some reductions that one can do in some cases.

Scaling: if n -> {a,b}, then k^2*n -> {k*a,k*b}

Multiplication: if n -> {a,b} and m -> {c,d}, then n*m -> DBF identities on {a,b} and {c,d}

I calculated all sum-of-two-square decompositions up to 10,000, and I found that all the irreducible ones are for primes. But at this stage, it is a conjecture, since it could be falsified for some larger number. So one must seek out some proof that works for all numbers.
 
Back
Top Bottom