David Meyer<p>Given that Christmastime is Christmas Math Time, please consider Fermat's Christmas Theorem.</p><p>Fermat’s Christmas Theorem (aka Fermat’s theorem on sums of two squares) is a beautiful theorem which states that an odd prime number p can be expressed as</p><p> p = r² + s²</p><p>where r, s ∈ N, if and only if p ≡ 1 (mod 4). That is, the theorem holds iff p = 4n + 1 for some n ∈ N.</p><p>For example, the primes 5, 13, 17, 29, 37 and 41 are all congruent to 1 modulo 4 and can be expressed as sums of two squares in the following ways:</p><p> 5 = 1² + 2²<br> 13 = 2² + 3²<br> 17 = 1² + 4²<br> 29 = 2² + 5²<br> 37 = 1² + 6²<br> 41 = 4² + 5²</p><p>On the other hand, the primes 3, 7, 11, 19, 23 and 31 are all congruent to 3 modulo 4 and none of them can be expressed as the sum of two squares. This is the easier part of the theorem to prove since it follows immediately from the observation that all squares are congruent to 0 or 1 modulo 4 [4].</p><p>The prime numbers p for which Fermat’s Christmas Theorem holds are called Pythagorean primes. See [1] for more on Pythagorean primes. </p><p>A variety of proofs of Fermat’s Christmas Theorem can be found in [5].</p><p>BTW, this theorem is called Fermat’s Christmas Theorem because Fermat announced a proof of the theorem in a letter to Mersenne dated December 25, 1640 [2]. And of course, Fermat didn’t include a proof in his letter.</p><p>A short blurb on all of this is here: <a href="https://davidmeyer.github.io/qc/christmas_theorem.pdf" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">davidmeyer.github.io/qc/christ</span><span class="invisible">mas_theorem.pdf</span></a>.</p><p>Merry almost Christmas everyone!</p><p><a href="https://mathstodon.xyz/tags/fermatschristmastheorem" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>fermatschristmastheorem</span></a> <a href="https://mathstodon.xyz/tags/christmastimeischristmasmathtime" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>christmastimeischristmasmathtime</span></a> <a href="https://mathstodon.xyz/tags/fermat" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>fermat</span></a> <a href="https://mathstodon.xyz/tags/mersenne" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>mersenne</span></a> <a href="https://mathstodon.xyz/tags/mathematics" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>mathematics</span></a> <a href="https://mathstodon.xyz/tags/numbertheory" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>numbertheory</span></a> </p><p>(1/2)</p>