Euler's Miracle Euler's Miracle

This article features some genuine Eulerian magic. In 1748, Leonhard Euler considered a modification of the harmonic series in which negative signs were attached to various terms by a rule that was far from self-evident. With his accustomed flair, he determined its sum, and the result was utterly improbable. There are a few occasions in mathematics when the term “breathtaking” is not too strong. This is one of them.


Introduction
Ranking high among the achievements of Leonhard Euler (1707-1783)-achievements that span the length and breadth of mathematics-is his work with infinite series.This topic had blossomed late in the previous century, especially in Jakob Bernoulli's Tractatus de seriebus infinitis from 1689 [1].The subject would not take rigorous form until the following century, when Augustin-Louis Cauchy defined infinite series as limits of partial sums in his 1821 masterpiece, Cours d'analyse [2].
Euler lived between Bernoulli and Cauchy.He thus had a foundation upon which to build but not the modern definition that we now take for granted.In particular, lacking the modern idea of "limit," Euler regarded infinite series in a more naïve, more holistic manner.He treated them as long (yes, very long!) sums that could be manipulated like their finitely-long cousins.
For Euler, the study of infinite series was fertile ground.In 1734 he famously solved the Basel problem, a challenge that had been issued by Jakob Bernoulli decades earlier [3].The object was to determine the exact value of the infinite series This defeated all who tried it until the young Euler, with a most ingenious argument, showed that The formula was, and remains, one of the strangest in mathematics.Who, after all, would expect  2 6  ⁄ to emerge from all those squares?But Euler was correct in his conclusion and gave multiple proofs over the course of his career (see [4], [5], and [6]).
Euler was also adept at treating divergent series.In a 1737 paper, he considered the sum of the reciprocals of the primes: Not only did he prove that this series "is infinite" (i.e., diverges), but he deduced that it diverged at the glacially slow rate of the logarithm of the logarithm.As seen in Figure 1, Euler expressed this in the notational style of the 18 th century, where his "l" is our "ln" [7].In describing this achievement André Weil wrote, "One may well regard these investigations as marking the origins of analytic number theory" [8].
So, the verdict is clear: Euler was a master of infinite series.
In this article, we examine another of his summations [9].If it is neither so famous nor so important as the two mentioned above, it is every bit as clever.Should anyone need further evidence of Euler's mastery of the subject, just read on.

Euler's Alternating Series
The series in question, which we denote by E (for "Euler"), is a most peculiar one: This is the harmonic series, but with certain signs changed from positive to negative.Although many terms are presented here, the rule for determining their signs is not transparent.At first glance, the pluses and minuses seem to arise in haphazard fashion.
Consider, for instance, the first ten terms.These suggest that every fifth fraction is negative.But this "rule" quickly fails, for 1/13 is negative and 1/25 isn't.Note also that the signs alternate from 1/12 to 1/18 but not thereafter.Something peculiar is going on.
The key to the pattern lies with the denominators of those fractions preceded by negative signs: 5, 10, 13, 15, 17, 20, 26, 29, 30, etc.It takes a bit of insight to identify their common property and thereby determine the next few entries on the list.If insight fails, we can insert these numbers into the On-line Encyclopedia of Integer Sequences to learn their secret.(Sure enough, this appears as A209922 in the OEIS.) Here's the explanation: factor a whole number into primes and include it in this sequence if and only if its prime factorization contains an odd number of primes which are one more than a multiple of 4, the so-called "4k + 1 primes."Thus, 5 and 13 and 17 belong because they are primes of this form.Also on the list are 10 = 2 • 5 and 26 = 2 • 13 and 30 = 2 • 3 • 5, for each contains only one such prime.On the other hand, 25 = 5 • 5 , as the product of two 4k + 1 primes, is not included.Neither are 130 = 2 • 5 • 13 or 625 = 5 4 , for these have an even number of 4k + 1 primes in their factorization.
So, to construct the infinite series E, we begin with the harmonic series and negate those fractions whose denominators factor into an odd number of 4k + 1 primes.An unsettling fact about this mode of construction is that we must know the prime factorization of n in order to determine whether 1/n is preceded by a plus or a minus.If n were a ten-thousand digit number, such a factorization would not only have exceeded Euler's computational ability but would overwhelm today's fastest computers.
By contrast, it is instructive to consider the Leibniz series given by In 1674, in an early indication of his mathematical genius, Gottfried Wilhelm Leibniz showed that the series sums to  4 ⁄ [10].It is trivial to find the sign preceding any term of this series.For instance, the fraction 1/3,333,333,333,337 is accompanied by a plus sign because its denominator is one more than a multiple of four.But to determine the sign of this same fraction in Euler's series, we would have to factor the denominator into primes and count how many are the form 4k + 1.This is vastly more challenging.
It is fair to say, then, that the series E is non-trivial.Finding its signs is difficult.Ascertaining whether it diverges or converges (conditionally) is more problematic.Determining its exact sum seems hopeless.To devote time to this last task looks like the height of folly.
But Euler did it.He showed that (spoiler alert) the series sums to .Exactly!This seems preposterous.Here we have a series with number theory in its genes, one whose very construction rests on the dichotomy between 4k + 1 and 4k + 3 primes.Yet the series sums to the ratio of a circle's circumference to its diameter.Is this a typo, or has number theory somehow morphed into plane geometry?
A skeptic might want to calculate partial sums.The sum of the first hundred terms of the series is about 2.93 and that of the first 200 is around 3.37.With help from OEIS, we learn that the partial sum of a few thousand more terms of Euler's series falls around 3.12.The nearness to  suggests that Euler might not have been hallucinating after all.
Of course, an approximation is not conclusive.We need to examine Euler's logical justification as it appears in Chapter XV of his 1748 work Introductio in analysin infinitorum.
To attack the problem, Euler used four preliminary results.The first three came from analysis.One was the value of the Leibniz series, mentioned above.The second was the answer to the Basel problem, also cited earlier.The third was this pair of elementary facts about an infinite geometric series: Although we commonly use these formulas to replace a geometric series by its simple sum, Euler was ever ready to reverse the process and expand 1/(1 − ) or 1/(1 + ) into their associated series.This will be apparent shortly.His fourth prerequisite was the unique factorization theorem-namely, that any whole number can be factored uniquely into the product of primes.Nothing in the theory of numbers is more fundamental.
With these few ingredients, Euler was ready to cook up a treat.He began by adding the Leibniz series to one-third of itself: This eliminated all denominators divisible by 3. Euler next took one-fifth of the resultant series and subtracted: At this point, all denominators containing a factor of 3 or 5 are gone.The next step was to multiply the last series by 1/7 and add to get: It is clear that at each stage the right-hand side begins 1 ± 1/ where p is prime.Euler continued the process "forever" (remember, this was before "limits" had been introduced), adding when 1/p was preceded by a minus sign in the Leibniz series and subtracting when it was preceded by a plus sign.Of course, this means that he added when the prime was of the form 4k + 3 and subtracted when it was of the form 4k + 1.The process gave him a remarkable formula involving the odd primes: From this, it followed that Note that Euler generated (A) by converting an infinite sum (the Leibniz series) into an infinite product.
We briefly set aside this result and consider a different expression built out of primes, this time including the prime 2. It begins with a quotient whose denominator is an infinite product: Euler transformed this into Treating each of these factors as the sum of an infinite geometric series, he replaced fractions with series: Here we have an infinite product of the series of reciprocals of even powers of the primes.If we multiply these as though they were finitely long and arrange the outcome with increasing denominators, we get a familiar series indeed.This works because of the unique factorization theorem.Any square can be uniquely decomposed into the product of primes raised to even powers, and all such powers appear somewhere in the infinite product above.For instance, we know that and so 1/144 arises as the product of 1/16 and 1/9.Moreover, there is no other way for it to appear here.By unique factorization, the reciprocal of every square will appear once and only once in this product.Putting all of this together and invoking the Basel problem, Euler concluded that Note that, in the process, Euler had converted an infinite product into an infinite sum, exactly the opposite of what he did to generate (A).He was nothing if not versatile.Taking reciprocals of the previous equation, Euler arrived at another wonderful formula: He now ended with a flourish.Dividing the result in (A) by that in (B), multiplying the quotient by 3/2, and cancelling wholesale, he reasoned that This is the product of infinitely many fractions of the form 1 (1 ± 1/) ⁄ , and, as we saw above, any such fraction can be expanded into a geometric series.Euler thus transformed his product into We observe that some of these series feature all positive terms, whereas others have alternating signs.And here is the key point: the alternating ones are those generated by primes of the form 4k + 1.We now multiply these geometric series and arrange the outcomes with increasing denominators.Unique factorization guarantees that the product contains the reciprocal of each whole number once and only once and that the sign of any reciprocal depends on how many 4k + 1 primes go into its product.If there is an odd number of such primes, our fraction is negative; otherwise, it is positive.(It is instructive to multiply some terms to see this happening.)The result of such multiplication is: then there exists a sequence of signs (  = +1 or − 1) such that ∑     =  .

∞ 𝑘=1
Thus, beginning with the alternating harmonic series and manipulating positive and negative signs, we can generate a series that converges to any number we wish.This has the power of generality, but the charm of Euler's achievement is that he found an explicit rule for signs that generated a series converging to .And that rule, improbably, involved the dichotomy between 4 + 1 and 4 + 3 primes.

Conclusion
It goes without saying that Euler was exploring uncharted territory.Results of this type now fall under the theory of Dirichlet series and require analytic subtleties not developed until many decades after Euler's death.Harvard mathematician Benedict Gross observed that "To me, the amazing thing about Euler is that he knew where to look.No one else was working on this, so he had no guide" [12].And historian of mathematics Ivor Grattan-Guinness memorably wrote that "Euler was the high priest of sum worship, for he was cleverer than anyone else at inventing unorthodox methods of summation" [13].Gross and Grattan-Guinness were surely correct, and there might be no better illustration of this truth than the unorthodox-and amazing-summation just described.
.If ∑   is a conditionally convergent series and if  is a real number, ∞ =1