<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sydney Birbrower on Medium]]></title>
        <description><![CDATA[Stories by Sydney Birbrower on Medium]]></description>
        <link>https://medium.com/@sydney4?source=rss-86d049ff796f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*4z_E4KJY9H7uxGCiXx-2_A@2x.jpeg</url>
            <title>Stories by Sydney Birbrower on Medium</title>
            <link>https://medium.com/@sydney4?source=rss-86d049ff796f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 07:50:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sydney4/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Pell’s Equation and the Chakravala Method]]></title>
            <link>https://sydney4.medium.com/pells-equation-and-the-chakravala-method-d4587f141b40?source=rss-86d049ff796f------2</link>
            <guid isPermaLink="false">https://medium.com/p/d4587f141b40</guid>
            <category><![CDATA[number-theory]]></category>
            <category><![CDATA[mathematics]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[indian-history]]></category>
            <category><![CDATA[math]]></category>
            <dc:creator><![CDATA[Sydney Birbrower]]></dc:creator>
            <pubDate>Thu, 27 May 2021 14:55:53 GMT</pubDate>
            <atom:updated>2021-05-27T14:55:53.398Z</atom:updated>
            <content:encoded><![CDATA[<p>Etymology is funny sometimes. Sometimes it tells you a lot, sometimes nothing at all. For example, the word <em>parabola</em> comes from the ancient Greek word for “applied.” <em>Hyperbola</em> comes from ὑπερβολή or “excessive” and <em>ellipse</em> is derived from “a deficient.” From their words, you’d almost think the Greeks weren’t fond of conic sections.</p><p>Don’t let it fool you. They loved them.</p><p>A large part of ancient Greek contributions to mathematics are based on the simplicity of taking slices of a cone. Euclid apparently wrote four books on conics (which history somehow managed to lose).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*WkpGXYUd3f6q0Fmr.png" /></figure><p>And just as the ancient Greeks loved conics, the medieval Indians loved algebra. We’re going to be focusing on one particular algebraic equation in this article, one that intersects both world. Integer solutions of a hyperbola.</p><p>The equation of a hyperbola is pretty simple:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QxL1-PR0ixoqbe7Xdf-Iog.png" /><figcaption>Where N is a positive number</figcaption></figure><p>Let’s draw a picture. Hyperbolas form an open curve with two sections that mirror each other. Both become straighter as they approach infinity along one of two asymptotes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aOXxPezeOCQKC3UsazXopA.png" /><figcaption>y²/a² — x²/b²=1, asymptotes y=-a/bx, y=a/bx</figcaption></figure><p>In terms of conic sections, a hyperbola is the intersection of a plane through both halves of a double cone. Interestingly enough, the plane does not need to be vertical. The hyperbola will still be symmetric if its intersecting plane is at a slant to the cone.</p><p>Let’s explore the equation a little more algebraically.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QxL1-PR0ixoqbe7Xdf-Iog.png" /><figcaption>This was called Varga Prakriti in Sanskirt- the equation of the multiplied square</figcaption></figure><p>What happens if you change N? The graph squishes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*x1v1vLoNGszT1QsfAKisSA.gif" /><figcaption>Large N is more squished.</figcaption></figure><p>What about changing the 1 on the right side? Calling this k, the two sides of the graph get further apart as k increases (remember this).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/562/1*VA20qx-EcxjfASxSikOfVw.gif" /><figcaption>Larger k gets further away</figcaption></figure><p>Now, let’s add some restrictions to the equation. What about integer solutions of x, y, and k? Do all k’s even have integer solutions? Obviously some do– in both gifs the graph crosses lattice points of the grid–but do all k’s have them? Is there an easy way to find the smallest solution if it does?</p><p>This is what medieval India was interested in. In modern terms, they were doing early Diophantine analysis on Pell’s equation. Some solutions were not something European mathematicians would solve until 1657, when Fermat sent out n=61 as a challenge to his peers.</p><p>Medieval India not only had already solved n=61, they had found a generalized algorithm for all n.</p><blockquote>“What would have been Fermat’s astonishment if some missionary, just back from India, had told him that his problem had been successfully tackled there by native mathematicians almost six centuries earlier?” — André Weil</blockquote><p><strong>Brahmagupta’s Identity</strong></p><p>The first identity we need is this:</p><blockquote>If two positive integers are each sums of two squares, then their product is a sum of two squares in two different ways</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zKXe7JgDSM3aIaFn4fYJAw.png" /></figure><p>For example, 10 can be written as 3²+1² and 41 can be written as 5²+4². Therefore, 10 · 41 can be written as the sum of two squares, and in two different ways: 19²+7² or 11²+17².</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gPqd993308IL_zfm43tAHw.png" /><figcaption>Geometric proof of sum of squares</figcaption></figure><p>Around the year 628, Brahmagupta generalized this identity into the following:</p><blockquote>Given a particular integer n, the set of all integers expressed as x² — ny² is closed under multiplication.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZXXzY5hkUTsa7j4oEYELNw.png" /></figure><p>A proof is given below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WFdZiADkXzl-L5zaXhe-ow.png" /><figcaption>Proof of Brahmagupta’s identity</figcaption></figure><p>Using Brahmagupta’s identity, we can use two triples (a, b, k) and create a composition law.</p><p>It works like this. If (a, b, and k₁) and (c, d, and k₂) are solutions to x² – ny² = k, then a² – nb² = k₁ and c² – nd² = k₂. Using the identity and multiplying them together, we get (a² – nb²)(c² – nd²) = (ac + nbd)² – n(ad + bc)² = k₁k₂.</p><p>And just like that, we’ve made another triple: (ac + nbd, ad + bc, k₁k₂).</p><p>Freely changing k, we have an infinite number of integer solutions to the equation.</p><p>Graphically, given two integer points on a hyperbola–say, (4, 1) and (7, 2) and an asymptote (in this case ±x/<strong>√</strong>10x), we can find another hyperbola with a larger k (and the same asymptotes) that crosses an integer point.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-bTrsn37cLmpKR-f3RLsHw.png" /><figcaption>Given these integer two points, we can find another hyperbola that crosses another integer point</figcaption></figure><p>This means we can generate integer points for an infinite number of hyperbolas, but we have a problem. The k’s always increase. Remember from the gif that larger k’s mean the hyperbola is shifted further from the origin. In Pell’s equation the hyperbola crosses x = 1. We want the k’s to decrease to one.</p><p>Brahmagupta, using his composition law and simple division, could sometimes solve for n = 1, but not for all integers and not with a general method. For example, he uses the example x² – 92y² = 1. He starts with the triple (10, 1, 8) because 10² — 92(1)² = 8 (remember, you can freely change the k’s) He composes it with itself to get the triple (192, 20, 64). Because 192² and 8² are both divisible by 64, he divides them. This gives the triple (24, 5/2, 1). Composing it with itself with give the triple (1151, 120, 1). Thus x = 1151, y = 120 is an integer solution of x² – 92y² = 1.</p><p>Bhahmagupta developed a few more tricks and shortcuts. He solved Pell’s equation for most low values of n and proved the if you could find a triple with k = -4, -2, -1, 2, or 4, then you could also find a triple for k = 1.</p><p>However, a general method would not be found until five centuries later.</p><p><strong>The Chakravala Algorithm</strong></p><p>This brings us to Bhaskara’s lemma, generalized in the verses of <em>Bijaganita</em> by Bhaskara II around 1150 (Bhaskara actually hints that he did not himself discover the method, but does not say who did).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f4KejOobwYA9w6nWbpysBw.png" /><figcaption>This creates a new triple, but not necessarily an integer triple</figcaption></figure><p>Assume we have a triple (a, b, k) that satisfies x² - ny² = k. We can make another trivial triple by setting y = 1. If x = c, then this triple is (c, 1, c² – n). Using the composition law, a new triple (ac + nb, a + bc, k(c² – n)) can be created.</p><p>From the triple (ac + nb, a + bc, k(c² – n)), Bhaskara did something clever. He figured out that you can choose a “c” that makes each of the quantities in the triple divisible by k², thus making the new triple <em>smaller</em> than the one that came before. Then you can repeat the process until k = 1.</p><p>It works like this. Choose a “c” so that a + bc is divisible by k. We already know k(c² – n) is divisible by k. a + bc is divisible by k (because we choose it to be so). Assuming “a” and “b” are relatively prime, we also know that ac + nb is divisible by k.</p><blockquote>Why? Because in an equation a + b = c, if any two of a, b, and c are divisible by another number x, then the third one is also divisible by x because you can factor x out on one side of the equation.</blockquote><p>And since both equations on the left are squared, we can divide the entire thing by k². This gives us</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q98qTIoE0xllCk3t-A5OLA.png" /></figure><p>An algebraic proof is below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tMmSmuUNBYvpOobzWIeiFQ.png" /><figcaption>Set c = m</figcaption></figure><p>The rest of the algorithm is pretty simple. Making sure to choose a “c” so that a + bc is divisible by k, we minimize c² – n. This ensures that the k our new triple has is as small as possible. Then just repeat.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8d626TPl2ajXYLy0Tnus_w.png" /><figcaption>BTW, Bhaskara described this entire thing in 8 lines of Sanskrit in poetic verse</figcaption></figure><p>Bhaskara named his method ‘chakravala’ (somewhat more helpfully than those Greeks) because of its cyclic nature of the algorithm. ‘Chakra’ means ‘wheel.’</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ec17f786464565097125438e71a7c19b/href">https://medium.com/media/ec17f786464565097125438e71a7c19b/href</a></iframe><p>Try the code for n = 61. This was the example Bhaskara used. He calculated that the smallest solution is a = 1766319049, b = 226153980 !</p><p>The algorithm is considered one of the most impressive discoveries in number theory until 18th century Europe. It is guaranteed to terminate with the smallest solution and usually does it very quickly with minimum calculation. It is also an early insight into the connection between repeating continued fractions and radicals, and is roughly equivalent to finding convergents of √n.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d4587f141b40" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The extraordinary life (and beliefs) of Mary Everest Boole]]></title>
            <link>https://sydney4.medium.com/the-extraordinary-life-and-beliefs-of-mary-everest-boole-39eae49f54c9?source=rss-86d049ff796f------2</link>
            <guid isPermaLink="false">https://medium.com/p/39eae49f54c9</guid>
            <category><![CDATA[mathematics]]></category>
            <category><![CDATA[victorian-england]]></category>
            <category><![CDATA[humor]]></category>
            <category><![CDATA[history]]></category>
            <category><![CDATA[women]]></category>
            <dc:creator><![CDATA[Sydney Birbrower]]></dc:creator>
            <pubDate>Thu, 25 Mar 2021 04:35:24 GMT</pubDate>
            <atom:updated>2021-03-25T04:35:24.003Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/696/0*_mgMNRcum9JEeghE.jpg" /></figure><h3>She was raised in a medical cult</h3><p>Mary Everest was born in the tiny English village of Wickwar, Gloucestershire, in 1832. When she was five, an influenza outbreak swept Europe and her father became gravely ill. The family decided to pick up and move to Poissy, France, hoping to find a cure in the hands of the famous German doctor Samuel Hahnemann.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qvr5QpO_XweZ2ITr1HzoUw.png" /><figcaption>Fun fact: this beautiful face is on more memorials in Washington DC than Harriet Tubman</figcaption></figure><p>Hahnemann is famous for being the father of homeopathy, the treatment famous today for doing precisely <a href="https://www.nccih.nih.gov/health/homeopathy">nothing</a>. Homeopaths believe in a doctrine of “similia similibus curentur” or “like cures like.” When one of his patients became sick, Hahnemann would find a substance that invoked similar symptoms and dilute it, using that as medicine. For example, an plant that caused a rash could be used as a treatment for a disease like chickenpox</p><p>In a time when <a href="https://en.wikipedia.org/wiki/Bloodletting#Use_through_the_19th_century">bloodletting</a>, leeches, and <a href="https://www.nature.com/articles/s41394-019-0222-8?proof=t">hitting people repeatedly</a> were not uncommon medical practices, homeopathy was kind of a Big Deal. It was harmless, intuitive, and deceptively scientific–Hahnemann soon became a celebrity in the medical world. And Reverend Thomas Everest, Mary’s father, was Hahnemann’s biggest fan.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iUBD__TXgSjoaURMCQfBVg.png" /><figcaption>Oh, Hahnemann thought that coffee was the root of all maladies. Never mind harmless, gonna go with 100% evil here.</figcaption></figure><p>In France, the Everest family lived and devoted themselves to the Hahnemann way of life. Diets were strict. Every morning Mary and her brother woke up for long, tiring walks before breakfast. And baths were cold–like, really cold. Her nurse would often have to break the ice with a stick. In the classic homeopathic fashion, “quarrelsome” children were given sambucus–a poisonous plant. Ridiculous, right?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z7tc_SXUxMg9HSrOgzCL9w.png" /><figcaption>Wait…</figcaption></figure><p>Overall, Mary really enjoyed her time in the Paris suburbs. She mingled with the French, and learned the language. She later claimed she never learned to think in English, even after spending decades in England:</p><figure><img alt="I have never [learned to think in English]. The English language contains no terminology in which it would be possible to express my kind of thought." src="https://cdn-images-1.medium.com/max/1024/1*dCE7iYMZDHpsXW2sx5O8Pw.png" /><figcaption>The French attitude certainly checks out</figcaption></figure><p>Sure, the house was cold and full of bats, but France was great and the children were thriving. Well…except for one small thing. The Paris suburbs were incredibly hard on Mary’s father. See, he was an English minister. And France, as it were, was full of Catholics.</p><p>This would not do.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oPKmztfSKwj2j7f6LW433A.png" /><figcaption>The perfect pet for your health nut colony! Something this cute could never cause disease.</figcaption></figure><p>Thomas Everest pulled Mary out of Catholic school and she was given private lessons from a man who she later credited for her lifelong love of mathematics. Monsieur Deplace did not lecture but rather taught math as a series of interactive questions and answers. This was at sharp contrast to the accepted methods of teaching children at the time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aiEvbBl8z_QM0F-XF5vTPQ.png" /><figcaption>In contrast to the usual methods of teaching math at the time, which were: “don’t” and “memorize shit,” respectively, depending on if you were a girl or boy</figcaption></figure><h3>She had one true love–mathematics</h3><p>The Everest family moved back to England when she was eleven and she quickly learned that universities like Cambridge did not admit women. She became her father’s assistant, helping with sermons and Sunday School. Meanwhile, she taught herself algebra and calculus out of textbooks in her father’s library.</p><p>She loved, loved, loved math (at one point calling it ‘the dawning of the physical passions’) and had an almost religious devotion to the subject.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*44VhMttL5Rk7ug648SI0VA.png" /><figcaption>Unlike me, who still hasn’t forgiven God for inventing algebra</figcaption></figure><h3>Mount Everest is named after her uncle</h3><p>I should point out that Mary Everest’s name is not pronounced EVER-est (like the mountain) but rather EEV-rist (also, um, like the mountain). See, around this time, the British Geographical Society had discovered that the tallest mountain in the world was not the one they had previously thought. Instead, it was a peak in the Mahalangur region called Peak XV.</p><p>The British needed a better name for it. Previously, they had been respecting local names (like Dhaulagiri and Kangchenjunga), but Peak XV didn’t have any specific name among the peoples south of the region. Presumably they existed, but the governments of Nepal and Tibet were not letting the British in to survey the place and check. (and I guess they didn’t bother asking?)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l8rvb58crnT9o0dg5MOraQ.png" /><figcaption>Fuck it. Let’s name it after an English guy.</figcaption></figure><p>So the mountain was named after Sir George Everest, British surveyor, Mary’s uncle, and man-who-had-never-seen-Mt-Everest™ as a ‘compromise’. George Everest opposed the decision, saying his name could not be written or properly pronounced in Hindi. But despite his wishes, the mountain was named after him and the Everest family became well known.</p><h3>She married George Boole, the inventor of Boolean algebra</h3><p>A visit to her other uncle, John Ryall, at Cork College Ireland would cause her to meet her future husband. He was 35, she was 18.</p><p>George Boole at this point was an already distinguished mathematician. Self-taught, he had never gone to university. Instead, he had gotten his professorship at Cork College through a series of well respected papers on differential equations and logic. He was also a poet, polyglot, teacher, and social advocate. Today he is considered the ‘Father of Symbolic Logic’ and one of the earliest figures in computer science.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FFXddFBVWdiN2VrrvqFemw.png" /><figcaption>George Boole</figcaption></figure><p>He was also, by all accounts, a really great guy. Mary describes speaking to a woman in Ireland and inquiring about him:</p><figure><img alt="‘What a favourite he seems to be’, I remarked. ‘He is no favourite of mine’, she said, ‘at least, I don’t enjoy his society. I don’t care to be with such very good people.’ I observed that I never should have suspected him of being too good to be agreeable. ‘Oh no,’ she said, ‘he never shows you that he thinks you wicked, but when you are near anyone so pure and holy, you can’t help feeling how shocked he must be at you. He makes me feel very wicked; but I am always at ease when the children are" src="https://cdn-images-1.medium.com/max/1024/1*bRDE0GwerImsD2QbL7bhFQ.png" /><figcaption>Never seen anyone have an inferiority complex about niceness before</figcaption></figure><p>Mary Everest asked him to be her math tutor and they instantly hit it off. The two bonded over riveting ideas like, “How to most efficiently teach differential calculus?” and “Why fluxions are the coolest.” They wrote letters to each other, almost exclusively about math, for five years. Once, Mary brought up more:</p><figure><img alt="“He begged me in a nervous, eager way, never to talk about such things to anyone but himself, as people would be sure to misunderstand me. Next day he put me through a long catechism as to what I intended to do with my life and ended by saying that as he was too old ever to think of marrying, he would, if I liked, be my friend and direct my education.”" src="https://cdn-images-1.medium.com/max/1024/1*VOWieFT2kZYsFD1nMdrMHA.png" /><figcaption>Little did he know it was a trap! Her ‘type’ was math tutors!</figcaption></figure><p>This did not last. In 1855 Thomas Everest died, leaving her penniless. George Boole stepped in right away to support her and the two married almost immediately. He was 40, she was 23.</p><p>By all accounts, it was a happy marriage. The couple had five children, Mary Ellen, Margaret, Alice, Lucy, and Ethel.</p><p>George had promised her that she would be able to help him with his research, and Mary became the informal editor of his publications. She helped write<em> A Treatise on Differential Equations </em>and <em>A Treatise on the Calculus of Finite Differences</em>, the two textbooks Boole was best known for at the time. She even got a taste for university:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bG8YaaZqrmIp_BaAhjmqEA.png" /><figcaption>Hooray for equality?</figcaption></figure><p>The happy marriage, however, was cut short by her husband’s death. In November 1864, George Boole was walking to class in the cold Irish rain and caught pneumonia. Mary, still an advocate of homeopathy and believing that “like cured like,” pored buckets of cold water on her husband’s sheets and wrapped him in wet blankets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YqcvdVF_MkrEdwJH7RNHFA.png" /><figcaption>This technique is commonly known as the “Bed, Bath, and Beyond”</figcaption></figure><p>Mary recalls reading John 3:8 to her husband on his deathbed:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8rMKzQr6d41Qd_YLK5zFQg.png" /></figure><p>Instead of somberly contemplating the somber passage for the somber occasion like normal people, it occurred to the two of them that Jesus was describing the “geometric figure of the dust-whirl…with its system of tangents and normals.”</p><p>George died of a fever-induced pleural effusion several weeks later. Mary Everest Boole would go on to live another fifty-two years.</p><p>The Athenaeum announced his death:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T7vYlAYuX5Mp4NKSIdbcvg.png" /><figcaption>(he actually died on a Thursday)</figcaption></figure><p>Mary Everest Boole was left widowed with five daughters between the ages of one and eight. Suddenly without income, she moved to London and became a librarian at a governess’s school.</p><figure><img alt="“The pupils were all women; the professors all men; women were admitted on the teaching staff only as subordinate assistants”" src="https://cdn-images-1.medium.com/max/1024/1*fM1V0aP-al0cyFaqMoOnhg.png" /></figure><p>She was seriously overworked and her daughters rotated between London and staying with other family, such as their grandmother in Cork. It wasn’t uncommon for her to see them for only an hour a day.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VYyQn0nwhO1DLEGkW6I1lQ.png" /><figcaption>Mary Everest Boole</figcaption></figure><p>Despite this, she managed to carve out a niche in the school and eventually obtained a position as a tutor in mathematics. She also held informal “Boolean logic” classes, lecturing about her late husband’s work.</p><h3>She may have had a polygamous relationship with a man known as ‘The Wizard’</h3><p>Around 1873, Mary Everest Boole was terminated from her employment at Queen’s College London. Accounts differ exactly as to why, but generally describe “an unstable character,” “temporary derangement,” and “dangerous ideas.” She then moved into the household of the Hintons.</p><p>James Hinton was born in Reading in 1822, the second oldest of eleven children. As a teenager he moved to London, worked as a cashier at a draper’s shop, and briefly travelled the world. He visited China, Sierra Leone, and Jamaica and served as a medical advisor to a ship carrying ‘free’ laborers to work on sugar plantations in Jamaica. Eventually he became an aural surgeon.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xwKswuPOJV7a4GkS70nwww.png" /><figcaption>James Hinton</figcaption></figure><p>Hinton (aka the Wizard) believed that “the world indeed is wonderful; it is divine, spiritual, eternal. This is heaven. We do well to be intoxicated, ravished with its beauty… and wonder.” He believed that people were fundamentally good, and only corrupted by the society around them. Pleasure, especially bodily pleasure, was intrinsically good and a gift from god.</p><p>He was basically a Victorian hippy.</p><p>Hinton’s ideas did not line up with conservative views at the time, and Hinton became infamous as an advocate of sexual freedom and polygamy. One letter described him as such:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Frhg7s_cnF0pu-rUt9QAbA.png" /><figcaption>Either that, or someone’s jealous</figcaption></figure><p>In 1870, he declared, “How utterly all feeling of impurity is gone from the sexual passion in my mind! It stands before me absolutely as the taking of food.”</p><p>Hinton firmly believed that women were “truly sensuous…even more than men” and that attitudes towards marriage as a social institution were oppressive. To Hinton, sexual restraint was as dangerous and sinful as sexual overindulgence.</p><p>He also advocated for nudism and polygamy. At one point, Hinton compared the vagina to the nose, as both were “physiologically organs of excretion.” Why should one be covered up but not the other?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ORkJcZtMN10xHYUJPGuGvw.png" /><figcaption>Sexy.</figcaption></figure><p>(Keep in mind that this was a time when women were routinely diagnosed with “hysteria”– a disease characterized by anxiety, sexual desire, insomnia, irritability, and loss of appetite. Today, this is known more formally as the condition of being “horny.”)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pbtzN5IzAlvAfgIqMZiRIg.png" /><figcaption>Right. We’re calling them “massages” now. Gotcha.</figcaption></figure><p>James Hinton believed all of societies problems could be solved with female sexual liberation. If single women weren’t so sad about not having sex, there wouldn’t be any more toxic female competition. And they didn’t need to be solely responsible for the family anymore–they could have careers as well! At one point he declared:</p><figure><img alt="“Prostitution was dead, I have slain it.”" src="https://cdn-images-1.medium.com/max/1024/1*86qbqQ2AoN69E5eSKXs1cw.png" /><figcaption>Was this the hero the gentler sex had been waiting for all along?</figcaption></figure><p>Other glorious quotes include:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N-j_m-9KMoLKEj55U_XMlw.png" /><figcaption>The hero women needed, but didn’t yet deserve?</figcaption></figure><p>After Mary lost her job, some sources say she became either the assistant or secretary for Hinton. Others say they got together. Mark Blacklock writes:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2mqM-fXmktqq2o-5X1UeKQ.png" /><figcaption>What a mad lad.</figcaption></figure><p>The relations between Hinton and Boole broke down sometime before his death. In one of James’s last correspondences to his son, he bitterly regrets his actions in life:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HYIaZ4IEH-ko_VZxirhZoQ.png" /><figcaption>haha, those two totally had an affair and it ended badly</figcaption></figure><p>His son, evidently, did not stay away from the Booles. Instead, he married Mary Everest Boole’s oldest daughter Mary Ellen. Then he married a second woman named Maud Florence. Then he …*drumroll please*… got convicted of bigamy and fled to Japan. Oopsie daisy?</p><h3>She was an early advocate for math education</h3><p>Mary Boole was one of the earliest advocates for math education in early childhood. She was adamantly against learning mathematics by rote, the typical Victorian method of repetition, and believed math and science should be about wonder.</p><p>She wrote the preface to Edith Somervell’s <em>A Rhythmic Approach to Mathematics </em>and was the author of several progressive educational papers such as <em>The Preparation of the Child for Science</em> and <em>Philosophy and Fun of Algebra</em>.</p><p>For example, to stimulate the geometric imagination, parents should place:</p><blockquote>“A common night-light placed in the bottom of a deep round jar in a dark room throws on a sheet of cardboard held over it patterns of conic-sections, which pass into each other as you change the position of die cardboard. Children very early learn to love watching figures thrown in light.”</blockquote><p>Here, she uses questions to teach children about numeration:</p><blockquote>“What is this 1 ? And this, 2 ? And this, 3? (..and so on), and this, 9? Now I want to write ten: how shall I do it ? Put 1 and 0. But what has ten done to be different from the rest ? Why should it have two signs instead of one like its neighbours? and why does it take signs belonging to its neighbours, instead of having one of its own? Did ten ask to have two signs? Did it wish to have two? No; then why do we give it two?”</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/0*jNkDHdLRLk5iRTq9.jpg" /><figcaption>Mary Boole</figcaption></figure><p>Mary Boole hated the fact that most people didn’t understand why they did things in math and declared, “A child should not see a multiplication table until he has made one.” She firmly believed in the art of thinking. According to her, learning math and training oneself to think logically could “free people from bondage.” For example, is there a reason numbers are in base ten, or do people just mindlessly follow what they learned in school?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*crOx57ngzT6THmCa04ihGg.png" /><figcaption>Superstitious nonsense, remember that</figcaption></figure><p>She studied mathematical psychology and encouraged children to use string to explore geometry through curve stitching and blocks, physics through magnets and static electricity, and biology through growing cress and watching gnats’ eggs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XD8FLTeqsrDqOK_SZHiSfg.png" /><figcaption>Curve stitching</figcaption></figure><p>Algebra, to her, wasn’t just a type of math but something we do “whenever we arrange facts that we know round a centre which is a statement of what it is that we want to know and do nut know; and then proceed to deal logically with all the statements, including the statement of our own ignorance. Algebra can be made about anything which any human being wants to know about. Everybody ought to be able to make Algebras; and the sooner we begin the better.”</p><p>Her view on algebra was almost pantheistic–math was tied into the laws of logic and logic was a kind of manifestation of God.</p><h3>She was an occultist and into other fringe ideas</h3><p>Mary Everest Boole wrote and published over a fifteen hundred pages after her husband’s death. She corresponded with Charles Darwin and was a central figure in many of London’s more fringe cultural movements. Her home was always open to soirées and informal gathering famous literary, scientific, and cultural figures could attend. She were especially popular with occultists, antivivisectionists, vegetarians, homeopaths, anarchists, and educational psychologists.</p><p>Generally well regarded, she had her enemies as well. She was once called “as noble a being as I have ever known though streaked with extraordinary arrogance.” She managed to annoy H.G. Wells (the author of <em>The Time Machine</em> and <em>The War of the Worlds</em>), enough that he wrote her into one of his books as a villain!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DkK1qY1swpgo-gOz0hxPUw.png" /><figcaption>From The New Machiavelli, Wells’s thinly disguised autobiography</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/0*YdeTMBiceXYCRuIx.jpg" /><figcaption>Pictured: Mary Everest Boole attacking a ship, 1906</figcaption></figure><p>She spent her later years writing on ‘Indian mysticism,’ Hebrew ritual under David Woolf Marks, dowsing rods, the humanness of Christ, spiritualism, and the occult. She even believed she was a spiritual guide:</p><figure><img alt="“My Father believed (and so do I) that every woman becomes at fifty potentially a medium, more or less. The temporary illness from which so many women suffer at this age is the effort of the mediumship to assert itself.”" src="https://cdn-images-1.medium.com/max/1024/1*Sq4-387x7H14RmIK5HnXNA.png" /><figcaption>Those hot flashes during menopause? They ghosts.</figcaption></figure><p>As well as dabbled in phrenology–the belief that bumps on the head could ascertain personality traits.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cnAXyCim9XQiF0GKoikjdg.png" /><figcaption>I, too, have a brain that extends below my eyes.</figcaption></figure><p>Animal magnetism was another popular topic. Founded by German doctor Franz Mesmer, it was the belief that an invisible force ran through all living beings. This force could be manipulated in attraction and repulsions, like a magnet. Practitioners were called mesmerizers and techniques often involved hypnosis (yup, the word mesmerize comes from his name). Mary once wrote:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*egHZvjlDCXApBJ2d29XCow.png" /><figcaption>Magneto-Jesus was apparently a late bloomer</figcaption></figure><p>Other predictions of hers were spot on, such as alluding to the development of the computer:</p><figure><img alt="“And if I were asked to point out the two greatest benefactors to humanity that this century has produced, I think I should be inclined to mention Mr Babbage, who made a machine for working out series, and Mr Jevons, who made a machine for stringing together syllogisms. Between them they have conclusively proved, by unanswerable logic of facts, that calculation and reasoning, like weaving and ploughing, are work, not for human souls, but for clever combinations of iron and wood. If you spend tim" src="https://cdn-images-1.medium.com/max/1024/1*Gec0Bttp3gKy1kxiDDKslQ.png" /><figcaption>Her late husband’s work would be adopted by Claude Shannon and instrumental in the development of the computer</figcaption></figure><p>Other passages are…not so decipherable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*50ECXJetK7WhlZ3baK4rlA.png" /><figcaption>Something something, conducting intercourse with multidimensional aliens? Yeah no, she lost me a while back.</figcaption></figure><h3>She founded a scientific dynasty</h3><p>Mary Everest Boole died in 1916, at the age of 84. On her death bed she announced to her daughter:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mncjKJsiArnRCbFfRl99qg.png" /><figcaption>Badass until the end.</figcaption></figure><p>Of Mary’s five daughters, one would marry a mathematician (and subsequently flee the country on his bigamy charges), one would <em>became</em> a mathematician (Alicia Boole Stott coined the term polytope and proved some interesting things about four dimensional shapes), another daughter would became one of England’s earliest female chemists, and another would became a famous author and have an affair with the spy who inspired James Bond (seriously).</p><p>The Boole grandchildren would invent the jungle gym, pioneer tuberculosis, create a portable X-ray, model Jupiter’s Great Red Spot, work on the Manhattan project, and discover several dozen species of beetles in Mexico.</p><p>Oh, and this family is still going at it. Her great-great-grandson, Geoffrey Everest Hinton, won the Turing Award (the most prestigious computer science prize) for his work on deep learning in 2018!</p><p>Further Reading:</p><p><em>The Booles and the Hintons</em> by Gerry Kennedy</p><p><em>The Life and Work of George Boole</em> by Desmond MacHale</p><p><em>New Light on George Boole</em> by Desmond MacHale and Yvonne Cohen</p><p><a href="https://mathshistory.st-andrews.ac.uk/Biographies/Boole_Mary/">https://mathshistory.st-andrews.ac.uk/Biographies/Boole_Mary/</a></p><p><a href="https://www.ams.org/journals/notices/201911/rnoti-p1853.pdf">https://www.ams.org/journals/notices/201911/rnoti-p1853</a></p><p><a href="https://higherspace.wordpress.com/2009/06/12/rucker-on-boole-stott-hintons-bigamy/">https://higherspace.wordpress.com/2009/06/12/rucker-on-boole-stott-hintons-bigamy/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=39eae49f54c9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Euler Number of a Binary Image]]></title>
            <link>https://sydney4.medium.com/the-euler-number-of-a-binary-image-1d3cc9e57caa?source=rss-86d049ff796f------2</link>
            <guid isPermaLink="false">https://medium.com/p/1d3cc9e57caa</guid>
            <category><![CDATA[topology]]></category>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[image-processing]]></category>
            <dc:creator><![CDATA[Sydney Birbrower]]></dc:creator>
            <pubDate>Tue, 23 Jun 2020 02:56:20 GMT</pubDate>
            <atom:updated>2020-06-23T02:56:20.975Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sUnuQA7UfpTy9sMqeByHrg.png" /><figcaption>A lung x-ray, thresholded using a correlation between Euler number and pixel importance in diagnosis</figcaption></figure><p>Let’s start with the basics: what is an Euler number? You may have seen this formula before, perhaps in a discrete mathematics class:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r-gWX0cPcGXRpxMobrlSEg.png" /><figcaption>Euler’s formula. You know it’s important with a name like that.</figcaption></figure><p>V stands for the number of vertexes, E the number of edges, and F the number of faces. In graph theory, if you have a planar, connected graph then its number of vertices, minus its number of edges, plus its number of faces (including the outside one) will always equal two. Always. There’s a great <a href="https://www.youtube.com/watch?v=-9OUyo8NFZg">3Blue1Brown</a> video if you are curious for a proof.</p><p>This is also a topological property of shapes. For any convex polyhedron (like a square or pyramid), V-E+F=2. But two isn’t particular special in the grand scheme of things. An Euler number can be anything, even negative numbers.</p><p>A cube’s Euler number is two. To transform a cube to get a different Euler number requires a bit of work. Stretching the shape won’t help because Euler numbers are topological invariants, and a stretched shape is basically the same shape in topology. But adding a hole or a convex side? That’ll do it.</p><figure><img alt="a mug" src="https://cdn-images-1.medium.com/max/1024/1*QAHfToMnJnmyeezkIF9rYQ.png" /><figcaption>(insert joke about how topologist can’t tell the difference between a coffee mug and a doughnut here)</figcaption></figure><p>So if this V-E+F formula works for 2D graphs and 3D shapes, could it work for images? After all, a binary image is basically just an array of ones and zeros. Pretty similar to a graph.</p><p>The Euler number of an image comes from the formula</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BCxaI2OWET4zcQNYSLHDNQ.png" /></figure><p>Where C is the number of connected components and H is the number of holes. Let’s say white denotes an object and black is the absence of that object. The letter ‘B’ therefore has three connected components, or three white spots (two enclosed in the letter and one that borders the image). There is also a ‘B’-shaped hole where the letter is. Therefore, the Euler number is 3–1=2.</p><figure><img alt="The letter ‘B’" src="https://cdn-images-1.medium.com/max/291/1*j6fmX4IVzNy6kfiQezmIBg.png" /><figcaption>You think I’d be better at drawing the letter ‘B’ by this point in my life.</figcaption></figure><p>So, how would a computer count the number of white spots? A human eye can do it with a simple look, but a computer would need to do a lot of iterating. This can be especially costly over large images and would be a bitch to parallelize. We need a method of calculating the Euler number locally.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/251/1*6TR8wkbrvOseahplUfqbPQ.png" /><figcaption>4 (white) connected components, 2 holes</figcaption></figure><p>The question is can we split the image up into parts where an operator computes over a fraction of the image and these results are later combined? It turns out the answer is yes. This result might seem a little weird–after all the Euler number is dependent on the number of holes and objects, and neither of those can be computed locally. But the combination of the two can! Geometry is weird like that.</p><p>We just need to count the number instances of these matrices:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/582/1*iO-q71xbCiY9cTVFyVUjWQ.png" /><figcaption>1 represents the foreground, 0 the background</figcaption></figure><p>We add the first and third and subtract the middle one. The formula is:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wjQQ5rVmwr-HCh_AnyfSDg.png" /><figcaption>‎▗ ‏‏‎ ‎—‏‏‎ ‎‏‏‎ ‎▟ ‎‎‎‎‎‏‏‎ ‎+‏‏‎ ‎‏‏‎ ‎▚</figcaption></figure><p>To make sense of this, let’s take a shape and mark all the points where the first matrix occurs. I am taking white as the foreground color here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W_atxjfhxizrTMRlQmhtuA.png" /><figcaption>Euler number is one</figcaption></figure><p>Notice that they are all on one side? It has to do with the difference between number of upstream-facing convexities and upstream-facing concavities. The first matrix will always occur on ‘convex’ edges where the shape is getting taller as seen reading from left to right.</p><p>The trick is to use one of these boxes as representation for the entire shape. Every object, no matter the shape, will have an M1 ◲ matrix. Try drawing it. You’ll quickly find that every object has an upper left hand side, and that upper left side is always M1 ◲.</p><p>Okay, but what about the other red boxes in the picture? We don’t want to double count our object (or in our case, count it 8 times). That’s where the second matrix comes in. Let’s label all the instances of M2 ◰ matrix.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o6Q6rbSEQ_RaKnQ9nMqAzA.png" /><figcaption>I should have used a different color.</figcaption></figure><p>Other than the upper left corner, they exactly cancel out! Subtracting the instances of these pixels is equivalent to counting connected components! Other than the top left corner, the only way to run across M1 ◲ is when the shape goes up and to the left. And all M1 ◲ obtained this way must have an M2 ◰ directly next to it.</p><p>What about holes? Like connected components can be represented by their top left corner, holes can be represented by their bottom right corner. M1 and M2 will mostly cancel again, and the result will be the Euler number.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bjhE2uHp-FqfqxIjEPCuLw.png" /><figcaption>Euler number is zero</figcaption></figure><p>What about that last matrix? M3. That one is to distinguish diagonals, because we are defining them as separate shapes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BfLXcmSGma12TlUwUBhn8g.png" /><figcaption>5 objects or 1? Notice we need M3 to count the red pixels.</figcaption></figure><p>Combining the counts of these three matrices, it gives an incredibly easy method to find an Euler number: loop through and count.</p><p>There is another subtlety here: are corner-adjacent cells considered neighbors, even when they are only connected by the diagonal? It depends on how we define the problem. There is the difference between the von Neumann neighborhood and the Moore neighborhood, or four-connectedness and eight.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W0qG2vNcB7KHn249jslIxw.png" /></figure><p>The above formula only works for 4-connectedness, although eight-connectedness isn’t much harder to implement.</p><p>Going back to our original formula for Euler’s number, V-E+F. We can actually translate this more directly into our image definition. Counting the number of foreground pixels ■ as vertices, edges as ▃ and ▍and faces as groups of four pixels in a square ▉ we get a more visual equivalent of Euler’s number. This, it turns out, is exactly equivalent to our connected component definition above.</p><p>The Euler number doesn’t have a lot of practical applications, but it does occasionally show up in computer vision, especially medical image processing.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1d3cc9e57caa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Prove the Infinity of Primes]]></title>
            <link>https://www.cantorsparadise.com/how-to-prove-the-infinity-of-primes-9ccfbe9bdd6a?source=rss-86d049ff796f------2</link>
            <guid isPermaLink="false">https://medium.com/p/9ccfbe9bdd6a</guid>
            <category><![CDATA[education]]></category>
            <category><![CDATA[research]]></category>
            <category><![CDATA[science]]></category>
            <category><![CDATA[math]]></category>
            <category><![CDATA[mathematics]]></category>
            <dc:creator><![CDATA[Sydney Birbrower]]></dc:creator>
            <pubDate>Sat, 25 Apr 2020 04:02:56 GMT</pubDate>
            <atom:updated>2020-04-26T15:03:22.787Z</atom:updated>
            <content:encoded><![CDATA[<p>Two simple proofs of the infinity of primes</p><p>Prime numbers are whole numbers that are only divisible by 1 and themselves. Students first learn about them in middle school, around the time when teachers are first introducing pesky equations with weird not-numbers like x and y. Remember these factor trees? All you need to know is division to construct one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*plp50abPHbASFgfKyShYbA.png" /><figcaption>The leaves of the tree are prime. It turns out that any number can be factored into primes in a unique way, with primes being factored into one and themselves.</figcaption></figure><p>But this simple rule of division turns out to be the basis the most pure of the pure of mathematics. Well, pure in the sense it routinely steals from other, seemingly unrelated math disciplines and constructs and beautiful Frankenstein-like whole called number theory.</p><p>Primes start with 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, etc. Then next is 31. Then 37. It keeps going. Currently the largest known prime is very big — 24,862,048 digits long. If you typed it out, it would be two and a half times the length of the Game of Thrones series.</p><p>But how far can we go? Are primes infinite?</p><p><strong>Euclid’s Proof on the Infinity of Primes</strong></p><p>The infinity of primes has been known for thousands of years, first appearing in Euclid’s Elements in 300 BCE. It’s usually used as an example of a classically elegant proof.</p><p>It goes something like this:</p><p>To prove that there are an infinite number of primes, we need to first assume the opposite: there is a finite amount of primes. Without pesky infinity in our way, let’s just list them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-31Sukrhw1461tn8u2g6dA.png" /><figcaption>p1 is our first prime (aka 2). pn is our nth prime, the largest one</figcaption></figure><p>If we multiply all of these <em>p</em>’s together, we’ll get another number, the product of primes. Let’s add one to this and call this number <em>q</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d_AX2tQsWodIJsOMUCdW-A.png" /><figcaption>our theoretical q will be very, very large</figcaption></figure><p>What is <em>q</em>? We have two options here: <em>q</em> is prime, or <em>q</em> is not prime (aka<em> q</em> is composite).</p><p>Looking at the first option, we already have a contradiction. We know <em>q</em> is not prime because we said so. Remember we just listed all the primes and <em>q</em> was not on the list. If it was a prime, it would be on the list and not on the list at the same time, which doesn’t make a whole lot of sense. So it must not be prime.</p><p>We have one option left: we are forced to assume <em>q</em> is composite. That is, it has prime factors — two of the primes on our list! But which ones? Let’s try <em>p1</em>. But we run into a problem here. Dividing <em>q</em> by <em>p1</em> gives us</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BPHkHK31oix2YItvT8PGuw.png" /></figure><p>The left side of the equation we know is an integer because any number divided by one of its factors is another factor (which is an integer). The product is an integer because all primes are integers. But <em>1/p1</em> cannot be an integer except when <em>p1</em> is equal to one. And we know it is not because 1 is not on our list (remember: one is not considered a prime). No matter how hard we try, a decimal plus an integer will not equal to an integer. Because of this contradiction, <em>q</em> cannot be composite.</p><p>We have no options left for our poor <em>q</em>, so it must not exist. We cannot create a list of all the primes, they must go on forever.</p><p>A fun historical fact is that when Euclid proved the infinity of primes he did not do basic algebra like I did, although his argument was the same. Algebra did not exist yet. In fact, his very idea of numbers itself was very different from our own. The ancient Greeks made a distinction between numbers, ratios, and measures. Euclid considered prime numbers “that which is measured by unit alone.” To him, prime numbers were not numbers but an uncuttable unit of length. In other words, he proved the infinity of primes with nothing but some geometric intuition.</p><p>Now for the more complicated (and clever) proof discovered by Christian Goldbach in 1730.</p><p><strong>Goldbach’s Proof on the Infinity of Primes</strong></p><p>The problem with primes is that there is no easy formula to find the next prime other than going through and doing some division, although there have been many attempts. It’s one of the reasons primes are so important in cryptography today.</p><p>So early mathematicians tried to solve the next-best thing: if they couldn’t find a function that spit out <em>all</em> primes, could a function be found that spit out <em>only</em> primes? Pierre de Fermat thought yes. A Fermat number is a number in the form</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CJInYh-HGWQMonEFRI8-vw.png" /><figcaption>where <em>n</em> is a nonnegative integer</figcaption></figure><p>Plug in <em>n</em> = 1, we get 3. Then 5, 17, 257, 65537, 4294967297. All prime! Well, not quite. Turns out Fermat made a math error, 641 is a factor of 4294967297. In fact, there don’t seem to be any more primes in the sequence after the first five.</p><p>But Fermat numbers still have a few tricks up their sleeves. It turns out any two Fermat numbers are relatively prime.</p><p>Relatively prime is a bit of a misleading terms — two numbers are relatively prime when their greatest common divisor is one. For example, the factors of 35 are 1, 5, 7, and 35. The factors of 6 are 1, 2, 3, and 6. Because their greatest common factor is one, 35 and 6 are relatively prime. If you draw a prime tree for each number, the trees shouldn’t have any common numbers between them. Alternatively, their least common multiple is found by multiplying the numbers together.</p><p>If all numbers in a set are relatively prime, none of their factors are shared. Think about what this set might look like: it can have at most one even number because all even numbers are divisible by two. We can only have one number that ends in 5.</p><p>The next question we might ask is: can we have an infinite set of <em>relatively</em> prime numbers? Since every number in this set could be broken up into “buckets” of its unique primes, this would also prove the infinity of primes. After all, you’d need an infinite amount of primes to populate an infinite list of relative primes. Each relative prime would hog at least one prime exclusively.</p><p>Let’s get back to Fermat numbers. Goldbach proved Fermat numbers satisfy the recurrence relation:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/882/1*DrPo0P5owK9-QmaVVNBCtw.png" /></figure><p>You can obtain the nth Fermat number from using all the previous Fermat numbers! You don’t even need the exponential formula. Try it out:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5662ba5bcf737459f1dede86f57baf0c/href">https://medium.com/media/5662ba5bcf737459f1dede86f57baf0c/href</a></iframe><p>To prove this recursion mathematically, we use a proof by induction. Our first step will be to show this formula is true for the first and second Fermat number. Then we are going to prove that if it is true for the nth case, it must be true for the nth+1 case. All the cases will then cascade like dominos. The first case proves the second which proves the third which proves the fourth and on and on and on.</p><ul><li>Step 1. It is true for first case</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jQi6MJseONIshzon9hK5zQ.png" /><figcaption>Plugging into the formula 2^(2^n) + 1, the first Fermat number is 3. The second is 5.</figcaption></figure><ul><li>Step 2. Show that if the nth is true then nth + 1 is also true. We start by assuming it is true, then work backwards</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dr0GO9wLJZvM1kBYL7DuRg.png" /></figure><p>We start with the product of sequence of Fermat primes, which is equal to itself (1). Now we suspect that each Fermat is equal to product of the previous ones minus two. So we single out the product of the previous with the parenthesis (2). Assuming our recurrence is true, it should equal two less than the nth Fermat number (3). Plug in the definition of Fermat numbers (4 and 5) and do some basic algebra with the difference of squares (6). We are left with an exponent and a subtraction which can be easily converted back into the Fermat number formula. What we are left with is the recursion.</p><p>From here, it is easy to prove Fermat numbers are pairwise relatively prime. We’ll use the same trick as before in Euclid’s proof.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vtbS_h8AbvYj7ERIjKcYXw.png" /></figure><p>Let’s say some factor <em>f</em> divides the nth Fermat number <em>Fn </em>as well as some other, smaller Fermat number. Therefore, we know the entire right side of the equation is an integer because all Fermat numbers smaller than <em>Fn</em> are contained in that product, and we said at least one of these is divisible by <em>f</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_IBQnUUaj-0wzXwkofqctw.png" /><figcaption>All terms should always be integers.</figcaption></figure><p>Well since the entire right side of the equation is an integer, the entire left side must be too. We know the term <em>Fn/f </em>is an integer because dividing by one of your own factors is an integer. So 2/<em>f </em>should be too. The problem is 2/<em>f</em> is always a fraction unless <em>f</em> = 1 or <em>f</em> = 2. One is not a prime, so it can’t be <em>f</em>. And look closely at the sequence of Fermat numbers — two to any power is always even and subtracting one from an even will always be odd. All Fermat numbers are odd. We are left with no factors that work for <em>f</em>. Therefore, no factors can evenly divide both Fn and some smaller Fermat number.</p><p>All Fermat numbers must then have a unique factorization. Each Fermat number can then be thought of as a set of disjoint primes. Since the Fermat sequence goes to infinity, we have an infinite set of unique prime numbers. Tada! Primes are infinite.</p><p>Of course, now we can do better. In 2013, a collaborative effort started by Yitang Zhang and worked on by Terrance Tao proved that not only are there an infinite number of primes, but there are infinite sets of primes certain distances apart. The lowest current bound is 246.</p><blockquote>References:</blockquote><blockquote>“Proofs from THE BOOK” by Martin Aigner and Günter M. Ziegler. Springer.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9ccfbe9bdd6a" width="1" height="1" alt=""><hr><p><a href="https://www.cantorsparadise.com/how-to-prove-the-infinity-of-primes-9ccfbe9bdd6a">How to Prove the Infinity of Primes</a> was originally published in <a href="https://www.cantorsparadise.com/">Cantor’s Paradise</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>