Showing posts with label erdos. Show all posts
Showing posts with label erdos. Show all posts

Friday, 19 June 2026

Sierpinski Numbers

I watched this video on YouTube video about Sierpiński numbers. It's quite informative but I thought I'd find out more.


I asked Gemini to find out more. Here is its report:

The Sierpiński Problem: An Exhaustive Analysis of Covering Systems, Primality, and Distributed Computational Number Theory

The intersection of abstract Diophantine number theory and large-scale computational mathematics has produced some of the most rigorous and collaborative problem-solving efforts in modern scientific history. At the center of this nexus lies the Sierpiński problem, a profound question that challenges mathematicians to determine the smallest odd natural number $k$ for which the expression $k \cdot 2^n + 1$ never yields a prime number for any positive integer $n$. Such numbers, known formally as Sierpiński numbers, represent a striking anomaly in the asymptotic distribution of primes, guaranteeing an infinite sequence of composite integers.

This comprehensive report explores the mathematical properties of Sierpiński numbers, the life and theoretical contributions of their discoverer Wacław Sierpiński, the foundational proof mechanisms involving cyclotomic covering sets, and the ongoing, decades-long distributed computing efforts—most notably the "Seventeen or Bust" initiative—that seek to resolve the Sierpiński problem and its associated mathematical variants.

Historical Context: The Life and Legacy of Wacław Sierpiński

To fully grasp the significance of Sierpiński numbers, it is essential to examine the historical and intellectual environment of their namesake, Wacław Franciszek Sierpiński (1882–1969). An eminent Polish mathematician, Sierpiński made outstanding and foundational contributions to set theory, point set topology, the theory of functions of a real variable, and number theory [cite: 1, 2, 3].

Born in Warsaw during the Russian Empire's occupation of Poland, Sierpiński’s early education was severely constrained by the systematic suppression of Polish culture [cite: 4, 5]. Following sweeping educational mandates implemented between 1869 and 1874, the Russian authorities forced all secondary schools and universities in the territory to operate entirely in the Russian language [cite: 3, 6]. The implicit geopolitical aim was to suppress Polish intellectual advancement; however, this hostile environment inadvertently forged Sierpiński's resilience and fierce intellectual independence [cite: 5].

Despite these formidable barriers, Sierpiński enrolled in the Department of Mathematics and Physics at the Czar's University (the official, Russian-controlled iteration of the University of Warsaw) in 1899 [cite: 1, 7]. His prodigious talent in number theory was recognized almost immediately. In 1903, the department announced a competition for an essay on the number theory contributions of the distinguished Russian mathematician Georgy Voronoy [cite: 3]. Sierpiński submitted a dissertation that won the university's gold medal in 1904 [cite: 1, 7].

His prize-winning work significantly advanced the famous Gauss circle problem. Specifically, if $R(r)$ denotes the number of integer lattice points $(m, n)$ contained within a circle of radius $r$ centered at the origin, there exists a constant $C$ and a number $k$ such that the error term is bounded by $|R(r) - \pi r^2| < C r^k$ [cite: 1, 7]. Carl Friedrich Gauss had originally proved in 1837 that the minimal value $d$ for $k$ is $d \le 1$. Sierpiński's major contribution was proving that this inequality could be tightened to $d \le 2/3$ [cite: 1, 7]. In 1913, the prominent German mathematician Edmund Landau shortened Sierpiński's proof, publicly describing the underlying mathematics as exceptionally profound [cite: 1, 7].

Despite his academic triumph, Sierpiński's Polish nationalism led him to withdraw his gold-medal essay from the university's Russian-language Izvestia journal, choosing instead to publish it years later in a Polish mathematical magazine [cite: 7]. Following his graduation in 1904, his academic journey pivoted toward set theory and topology. He became deeply fascinated by the continuum hypothesis, the axiom of choice, and fractal curves, eventually introducing geometric concepts that bear his name, such as the Sierpiński triangle (or gasket), the Sierpiński carpet, and the Sierpiński space-filling curve [cite: 4]. He was also the first to provide a concrete example of an absolutely normal number in 1916—a number whose digits occur with equal asymptotic frequency in any given base [cite: 6].

During World War II, Sierpiński courageously continued his academic work within the "Underground Warsaw University" while officially employed as a municipal clerk, smuggling his mathematical papers out of occupied Poland to be published in Italy [cite: 1]. However, his enduring fascination with the structural properties of integers eventually led his focus back to pure number theory. In 1960, utilizing advanced techniques in modular congruences, Sierpiński published a seminal proof establishing the existence of the numbers that now bear his name [cite: 8, 9, 10].

Mathematical Foundations and Polignac's Conjecture

The expression $k \cdot 2^n + 1$, where $k$ is an odd positive integer and $n$ is a positive integer, generates a specific class of integers. When the exponentiated term overtakes the multiplier (specifically, when $2^n > k$), the resulting integer is known as a Proth number, named after the 19th-century French mathematician François Proth [cite: 1, 3]. Proth numbers are highly significant in computational number theory because their primality can be tested with exceptional algorithmic efficiency using Proth's theorem, circumventing the need for exhaustive trial division [cite: 1, 11].

A Sierpiński number is defined specifically as an odd natural number $k$ such that the Proth expression $k \cdot 2^n + 1$ is composite for every integer $n \ge 1$ [cite: 10, 12]. For the vast majority of $k$ values, evaluating successive values of $n$ quickly yields a prime number. For instance, if $k = 3$, setting $n = 2$ produces $3 \cdot 2^2 + 1 = 13$, which is prime; thus, 3 is immediately disqualified as a Sierpiński number [cite: 2, 3]. The core mathematical anomaly of a Sierpiński number is that its sequence completely evades the infinitely many prime numbers scattered throughout the integers.

The conceptual architecture of Sierpiński's 1960 proof relies heavily on addressing a flawed hypothesis known as Polignac's conjecture. In 1849, the French mathematician Alphonse de Polignac conjectured that every odd integer greater than 1 could be expressed as the sum of a prime number and a power of two (i.e., $p + 2^k$) [cite: 13, 14]. While Leonhard Euler had previously noted isolated counterexamples like 127 and 959, Polignac's conjecture remained a subject of intense debate until 1950 [cite: 14].

In 1950, the prolific Hungarian mathematician Paul Erdős and the Dutch mathematician J. G. van der Corput independently disproved Polignac's conjecture with rigorous finality [cite: 15]. Erdős proved that there exists an infinite arithmetic progression of odd numbers that cannot under any circumstances be represented as a sum of a prime and a power of two [cite: 9]. To achieve this, Erdős utilized a mathematical construct known as a "covering set" (or covering system) of congruences [cite: 13]. Erdős observed that by carefully selecting a finite set of prime numbers—specifically $\{3, 5, 7, 13, 17, 241\}$—one could create a modular interlocking system where every possible exponent $n$ aligns with a modulus that forces the resulting expression to be divisible by at least one of those selected primes [cite: 9, 16].

Sierpiński’s 1960 Proof and the Mechanics of Covering Sets

Building directly upon Erdős's foundational concept of covering systems, Sierpiński proved his eponymous theorem: there exist infinitely many odd positive integers $k$ such that $k \cdot 2^n + 1$ is strictly composite for all positive integers $n$ [cite: 17].

The proof mechanism relies on a finite covering set of congruences. A covering set $P = \{p_1, p_2, \dots, p_m\}$ is a finite set of prime numbers constructed so that for every positive integer $n$, the expression $k \cdot 2^n + 1$ is divisible by at least one $p_i \in P$ [cite: 18, 19]. Sierpiński constructed a precise covering of exponents $n$ using the moduli $\{2, 4, 8, 16, 32, 64\}$. This specific covering ensures that every integer $n$ satisfies at least one modular condition, triggering divisibility by a corresponding prime.

The mechanics of Sierpiński’s 1960 proof can be modeled by mapping the exponent conditions to their required prime divisors and the resulting congruences for $k$.

Index | Modulus for n | Exponent Congruence | Prime Divisor (p_i) | Required Congruence for k
1 | 2 | n = 1 mod 2 | 3 | k = 1 mod 3
2 | 4 | n = 2 mod 4 | 5 | k = 1 mod 5
3 | 8 | n = 4 mod 8 | 17 | k = 1 mod 17
4 | 16 | n = 8 mod 16 | 257 | k = 1 mod 257
5 | 32 | n = 16 mod 32 | 65537 | k = 1 mod 65537
6 | 64 | n = 32 mod 64 | 641 | k = 1 mod 641
7 | 64 | n = 0 mod 64 | 6700417 | k = -1 mod 6700417

Table 1: The covering system utilized in Wacław Sierpiński's 1960 proof [cite: 18].

The primes $\{3, 5, 17, 257, 641, 65537, 6700417\}$ form the covering set $C$ [cite: 1]. This specific set is highly delicate and demonstrates a deep structural connectivity to Fermat numbers. It functions explicitly because the fifth Fermat number, $F_5 = 2^{32} + 1$, factors cleanly into two distinct prime divisors: 641 and 6,700,417 [cite: 1].

By invoking the Chinese Remainder Theorem, Sierpiński proved that there exists a simultaneous solution $k$ to all the modular constraints listed in Table 1 [cite: 1]. Furthermore, because the prime moduli are pairwise coprime, the solutions for $k$ repeat periodically, forming an infinite arithmetic progression [cite: 1]. Any $k$ falling within this progression ensures that $k \cdot 2^n + 1$ is divisible by at least one prime in the covering set $C$ for any conceivable $n$, thus guaranteeing absolute compositeness [cite: 17, 19]. Solving this system of congruences yields the smallest $k$ native to Sierpiński's original method—an unwieldy 20-digit integer: 15,511,380,746,462,593,381 [cite: 17, 20].

John Selfridge and the Formulation of the Sierpiński Problem

While Sierpiński brilliantly proved the existence of these infinite progressions, he did not attempt to hunt for the absolute smallest example of such a number. In 1962, the American mathematician John Selfridge—renowned for his work on Fermat numbers, primality testing, and his proof alongside Erdős that the product of consecutive integers is never a power—addressed this gap [cite: 8, 21].

Selfridge discovered a far more elegant and numerically compact covering set [cite: 1, 22]. He demonstrated that $k = 78557$ is a Sierpiński number by employing a covering set consisting of only seven small primes: $\{3, 5, 7, 13, 19, 37, 73\}$ [cite: 3, 8]. For $k = 78557$, the covering functions beautifully over the modulus 36 [cite: 19]. Selfridge proved that every number of the form $78557 \cdot 2^n + 1$ is perfectly divisible by at least one prime in this covering set, thereby ensuring that no prime number can ever be generated by the sequence [cite: 8, 18, 21].

A critical nuance in the definition of a Sierpiński number is the strict requirement that $k$ must be an odd integer [cite: 8]. If this constraint were removed, the number $k = 65536$ ($2^{16}$) would likely be a smaller candidate [cite: 23]. For $k = 65536$, the expression becomes $2^{16} \cdot 2^n + 1 = 2^{n+16} + 1$ [cite: 24]. This sequence only yields primes if $n+16$ is a power of 2, generating Fermat numbers. Since it is widely believed (though unproven) that $2^{16} + 1$ is the largest prime Fermat number, $65536 \cdot 2^n + 1$ would technically be composite for all $n > 0$ [cite: 23, 25]. To avoid entangling the Sierpiński problem with the unproven finiteness of Fermat primes, the definition strictly excludes even numbers, solidifying 78,557 as the premier candidate [cite: 3, 24].

Following his discovery, Selfridge engaged in private correspondence with Paul Erdős, conjecturing that 78,557 was not merely a Sierpiński number, but the absolute smallest possible Sierpiński number [cite: 8, 26]. Determining the mathematical truth of this conjecture is known as the Sierpiński Problem [cite: 8, 10].

Algebraic Compositeness: Aurifeuillean Factorizations

While covering sets represent the dominant mathematical paradigm for proving that a number is a Sierpiński number, they are not the sole mechanism. In 1995, the mathematician A. S. Izotov demonstrated that certain fourth powers could be proven to be Sierpiński numbers without establishing a comprehensive covering set for all possible values of $n$ [cite: 8, 27].

Izotov's proof relied on an advanced algebraic identity known as Aurifeuillean factorization [cite: 1]. He showed that expressions of the form $t^4 \cdot 2^{4m+2} + 1$ can be factored purely algebraically, independent of modular prime divisibility:

$$t^4 \cdot 2^{4m+2} + 1 = (t^2 \cdot 2^{2m+1} + t \cdot 2^{m+1} + 1) \cdot (t^2 \cdot 2^{2m+1} - t \cdot 2^{m+1} + 1)$$ [cite: 1, 28].

Because this polynomial factorization always splits the expression into two distinct integers strictly greater than 1, it proves that any exponent of the form $n \equiv 2 \pmod 4$ natively gives rise to a composite number [cite: 8]. Therefore, a covering set is only required to eliminate the remaining exponent classes: $n \equiv 0, 1, \text{ and } 3 \pmod 4$ [cite: 8]. Izotov's technique provides a profound second-order insight: the compositeness of the $k \cdot 2^n + 1$ sequence can arise from inherent algebraic geometry and polynomial expansion, rather than relying solely on the cyclical, interlocking gears of prime modular arithmetic.

The Distributed Computation Era: Solving the Sierpiński Problem

To rigorously prove Selfridge's conjecture that 78,557 is indeed the smallest Sierpiński number, mathematicians face a daunting task of exhaustive elimination. They must prove that every single odd integer $k < 78557$ is not a Sierpiński number [cite: 3, 8]. A candidate $k$ is successfully eliminated if and only if a positive integer $n$ can be found such that $k \cdot 2^n + 1$ is prime [cite: 8].

Pre-Internet Computational Efforts

In the late 1970s and early 1980s, testing these numbers was an arduous process constrained by the hardware limitations of early academic mainframes. By 1983, computational searches had determined that there were 70 values of $k < 78557$ for which no prime had been found for exponents $n \le 8000$ [cite: 10, 16]. Over the subsequent 14 years, targeted algorithmic testing slowly eliminated 48 of those multipliers [cite: 10].

A major paradigm shift occurred in August 1997 with the introduction of the Proth.exe software developed by Yves Gallot [cite: 2]. This program heavily optimized Proth's theorem for standard consumer personal computers, allowing amateur mathematicians to participate in the search. Utilizing Proth.exe, a decentralized group of enthusiasts (including Lew Baxter, Marc Thibeault, and Janusz Szmidt) systematically eliminated more candidates [cite: 22]. By the end of 2001, the list of unsolved multipliers below 78,557 had been reduced to exactly 17 [cite: 1, 10].

The "Seventeen or Bust" Project (2002–2016)

Recognizing that the exponent $n$ required to find a prime for the remaining 17 values was reaching into the hundreds of thousands—necessitating vast, decentralized amounts of computational power—two college undergraduates, Louis Helm and David Norris, along with Michael Garrison, conceived the distributed computing project "Seventeen or Bust" in March 2002 [cite: 16, 29]. The project's public client was released on April 1, 2002, allowing volunteers worldwide to donate their idle CPU cycles to test specific $k$ and $n$ pairings [cite: 29, 30].

The project was immensely successful and heralded the golden era of crowdsourced mathematics. Within its first year, it eliminated five $k$ values. Over its 14-year lifespan as an independent project, Seventeen or Bust found massive primes that eliminated 11 of the 17 candidates [cite: 16]. The primes discovered were mathematically significant; for instance, the prime found for $k = 19249$ by Konstantin Agafonov in 2007 contained nearly 4 million digits, making it the largest known non-Mersenne prime at the time [cite: 2, 30].

In 2010, the global volunteer platform PrimeGrid officially partnered with Seventeen or Bust to accelerate the search using the BOINC (Berkeley Open Infrastructure for Network Computing) infrastructure [cite: 31, 32]. Unfortunately, in April 2016, the Seventeen or Bust project suffered a catastrophic datacenter failure resulting in the loss of critical un-backed-up data [cite: 10, 33]. Consequently, PrimeGrid assumed full administration of the project and absorbed its mission [cite: 16, 29, 33].

Shortly after this transition, PrimeGrid facilitated the discovery of a 12th prime, eliminating $k = 10223$. Discovered by Szabolcs Péter of Hungary on October 31, 2016, the prime $10223 \cdot 2^{31172165} + 1$ contains a staggering 9,383,761 decimal digits [cite: 1, 16, 33]. The calculation required nearly 9 days of continuous processing on an Intel i7 CPU [cite: 16, 33]. At the time of its discovery, it was the 7th largest known prime overall, the largest known Proth prime, and the largest known Colbert number [cite: 16, 33, 34].

k Value | Exponent (n) | Decimal Digits | Date Discovered | Discoverer
46157 | 698207 | 210186 | Nov 27, 2002 | Stephen Gibson
65567 | 1013803 | 305190 | Dec 2, 2002 | James Burt
44131 | 995972 | 299823 | Dec 5, 2002 | Anonymous
69109 | 1157446 | 348431 | Dec 6, 2002 | Sean DiMichele
54767 | 1337287 | 402569 | Dec 23, 2002 | Peter Coels
5359 | 5054502 | 1521561 | Dec 6, 2003 | Randy Sundquist
28433 | 7830457 | 2357207 | Dec 30, 2004 | Team Prime Rib
27653 | 9167433 | 2759677 | Jun 8, 2005 | Derek Gordon
4847 | 3321063 | 999744 | Oct 15, 2005 | Richard Hassler
19249 | 13018586 | 3918990 | Mar 26, 2007 | Konstantin Agafonov
33661 | 7031232 | 2116617 | Oct 17, 2007 | Sturle Sunde
10223 | 31172165 | 9383761 | Oct 31, 2016 | Szabolcs Péter

Table 2: The 12 mega-primes discovered by the Seventeen or Bust and PrimeGrid collaborations, successfully eliminating their respective $k$ values from the Sierpiński problem [cite: 31, 32].

Current Status: "Five or Bust"

As of the mid-2020s, decades of concerted computational effort have distilled the original Sierpiński problem down to exactly five remaining unproven multipliers [cite: 8, 35]. While the project name could accurately be updated to "Five or Bust," PrimeGrid retains the original moniker for historical continuity [cite: 29, 35].

To definitively prove that 78,557 is the smallest Sierpiński number, a prime must be found for each of the following $k$ values:

Remaining Candidates for the Sierpinski Problem
k = 21181
k = 22699
k = 24737
k = 55459
k = 67607

Table 3: The five remaining odd multipliers below 78,557 [cite: 8, 10, 35].

Computational Infrastructure and Hardware Dynamics

The search continues under PrimeGrid utilizing a global network of hundreds of thousands of volunteers, supplying thousands of TeraFLOPS of processing power to test exceedingly large exponents [cite: 31]. The search space has long surpassed $n = 36420000$, venturing into algorithmic territory where any prime discovered will be well over 10 million decimal digits long [cite: 10, 30].

The underlying mathematics of the search relies on Fast Fourier Transform (FFT) algorithms to multiply ultra-large integers efficiently. Applications like LLR (Lucas-Lehmer-Riesel), PRST, and Genefer are heavily optimized for both CPU and GPU execution [cite: 16, 35, 36]. The workflow is strictly bifurcated into two phases: sieving and primality testing. Sieving acts as a highly efficient filter, removing candidate exponents that have small algebraic factors. However, the deeper the sieve goes, the slower the rate of candidate removal becomes, eventually hitting an "optimal depth" where sieving takes just as much computational time as running a full primality test [cite: 28, 37].

Because computing large $n$ values requires intense, uninterrupted CPU time, multithreading is frequently employed. A single task running on one CPU core can take upwards of two to four weeks on older machines, making the tuning of parameters like max cpus critical for participants [cite: 35]. Interestingly, deep hardware analysis indicates that hyperthreading (or SMT) frequently decreases overall throughput for LLR primality testing. This negative performance scaling occurs because FFT calculations rely heavily on cache continuity and memory bandwidth rather than instruction pipeline multiplexing, prompting project organizers to advise volunteers to disable hyperthreading for LLR tasks [cite: 35, 38].

PrimeGrid also conducts rigorous "double checking" of legacy data. Because Seventeen or Bust suffered data loss, PrimeGrid systematically retests specific ranges of $n$ (comparing mathematical residues) to ensure no primes were missed due to hardware calculation errors or incomplete validation [cite: 30, 39, 40]. Two of the original twelve primes (for $k = 4847$ and $k = 33661$) were discovered exclusively because volunteers were double-checking previously computed ranges, highlighting the necessity of cryptographic-level verification in these searches [cite: 29, 39].

Generalizations and Extended Number Theory Problems

The theoretical proofs and computational methodologies developed for the Sierpiński problem have laid the groundwork for an entire taxonomy of associated mathematical conjectures. By altering the parameters, constraints, or signs of the $k \cdot 2^n + 1$ sequence, number theorists have generated a suite of derivative problems.

The Prime Sierpiński Problem

In 1976, Nathan Mendelsohn proved that $k = 271129$ is a Sierpiński number, utilizing the covering set $\{3, 5, 7, 13, 17, 241\}$ [cite: 1, 2]. Because 271,129 is itself a prime number, this discovery initiated the Prime Sierpiński Problem: determining the smallest Sierpiński number that is also a prime [cite: 8, 22].

To establish 271,129 as the smallest prime Sierpiński number, all prime integers less than 271,129 must be tested. Currently, there are nine prime multipliers for which no prime of the form $k \cdot 2^n + 1$ has been found: 22699, 67607, 79309, 79817, 152267, 156511, 222113, 225931, and 237019 [cite: 8, 22]. Notably, the first two values (22,699 and 67,607) are less than 78,557, meaning they are shared candidates with the original Seventeen or Bust project [cite: 10, 28]. PrimeGrid operates the "Prime Sierpinski Problem" (PSP) subproject specifically to eliminate these remaining values [cite: 3, 8, 28].

The Extended Sierpiński Problem

Assuming Selfridge's conjecture holds and 78,557 is the absolute smallest Sierpiński number, and assuming Mendelsohn's 271,129 is the smallest prime Sierpiński number, a structural gap exists. The Extended Sierpiński Problem asks: Is 271,129 the second smallest Sierpiński number overall? [cite: 8, 22].

Answering this requires searching the interval $78557 < k < 271129$ for any composite Sierpiński numbers [cite: 8, 22]. Eliminating the candidates in this range requires finding a prime for each composite $k$. As of the most recent computational updates, 11 composite multipliers remain in this interval: 21181, 24737, 55459, 91549, 131179, 163187, 200749, 209611, 227723, 229673, and 238411 [cite: 22]. (Again, 21181, 24737, and 55459 are shared with the original Five or Bust list, demonstrating the interwoven nature of these conjectures [cite: 22].)

Riesel Numbers and Dual Compositeness

The algebraic inverse of the Sierpiński function is the sequence $k \cdot 2^n - 1$. An odd natural number $k$ for which this expression is composite for all positive integers $n$ is known as a Riesel number [cite: 13, 15]. In 1956—four years prior to Sierpiński's proof—the Swedish mathematician Hans Riesel proved the existence of such numbers and demonstrated that $k = 509203$ is a Riesel number [cite: 15, 41].

Like Sierpiński numbers, Riesel numbers rely heavily on covering systems. However, the required primes often differ significantly due to the $-1$ altering the cyclotomic properties and algebraic factorization geometry [cite: 13, 19]. Unlike the $+1$ form, which allows flexible use of small primes like 5 and 7, Riesel coverings often require more complex congruences to avoid overlapping failures [cite: 8]. The quest to prove 509,203 is the absolute smallest Riesel number continues through PrimeGrid's "The Riesel Problem" subproject [cite: 6, 11].

Brier Numbers: Simultaneously Sierpiński and Riesel

A profound synthesis of these two sequences was theorized by Eric Brier, who asked whether an integer could be simultaneously a Sierpiński number and a Riesel number [cite: 8, 23, 42]. Such an integer, now known as a Brier number, must satisfy the condition that both $k \cdot 2^n + 1$ and $k \cdot 2^n - 1$ are composite for all positive integers $n$ [cite: 8, 17, 43].

Because a Brier number must satisfy the congruences of two independent covering sets simultaneously, the values of $k$ escalate dramatically. The smallest known Brier number, discovered by Christophe Clavier in 2013, is a 41-digit behemoth: 3,316,923,598,096,294,713,661 [cite: 1, 19, 24]. By leveraging a theorem of D. Shiu on the distribution of primes in arithmetic progressions, it has been mathematically proven that for every positive integer $r$, there exist $r$ consecutive primes that are also Brier numbers, hinting at the deeply patterned, yet elusive, nature of prime distributions [cite: 23, 42]. A 2021 Dartmouth College study by Pomerance et al. further proved that infinitely many numbers are simultaneously Sierpiński, Riesel, and Carmichael numbers, creating an intersection of pseudo-primality and forced compositeness [cite: 1].

Base Extensions, Repdigits, and the First Kind

While the standard definition operates in Base 2, the mathematics generalizes readily to any integer Base $b \ge 2$, where one searches for $k$ such that $k \cdot b^n + 1$ is composite for all $n$ [cite: 25, 44]. PrimeGrid operates projects like the Sierpinski/Riesel Base 5 problem to eliminate candidates where $b=5$ [cite: 6, 44]. In 2025, PrimeGrid successfully eliminated $k = 67612$ in Base 5 by discovering a 3.8-million-digit prime (which took only 1 hour and 24 minutes of PRP testing on an AMD Ryzen 9 7945HX), bringing the remaining Base 5 candidates down to 27 [cite: 6, 36].

Furthermore, Sierpiński numbers of the first kind refer to primes of the form $k^k + 1$. Sierpiński himself proved that for $k^k + 1$ to be prime for any $k>1$, $k$ must take the highly restrictive form $2^{2^j}$, tying the sequence directly back to Fermat numbers [cite: 45, 46]. Mathematical investigations have also extended to detecting Sierpiński and Riesel numbers among restrictive integer subsets, such as Fibonacci sequences, Lucas numbers, and repdigits (numbers consisting solely of a single repeated digit in a given base) [cite: 15, 47].

Broader Implications and Conjecture Outlook

The quest to resolve the Sierpiński problem acts as a crucible for both pure mathematical theory and applied computer science. At the theoretical level, the existence of Sierpiński numbers directly links to Paul Erdős's combinatorial number theory. Erdős conjectured that for any Sierpiński number $k$, the smallest prime divisor of $k \cdot 2^n + 1$ must be bounded as $n$ approaches infinity [cite: 15, 27]. If this is proven true, it solidifies the hypothesis that all Sierpiński numbers are strictly the product of covering systems, ruling out any undiscovered algebraic anomalies that might cause infinite compositeness without a finite, periodic covering set [cite: 13, 27].

At the applied level, the search drives massive innovations in high-performance computing (HPC). The algorithms used by PrimeGrid to multiply integers spanning millions of digits—relying on discrete Fourier transforms and advanced memory bandwidth management—routinely push the physical boundaries of hardware stability [cite: 31, 35]. The massive prime numbers discovered in these searches are frequently utilized to stress-test modern CPU and GPU architectures, successfully identifying microscopic, silicon-level calculation errors before those processors are deployed in commercial, scientific, or cryptographic environments.

Conclusion

The Sierpiński problem stands as a towering testament to the enduring complexity of prime number distribution. What began in 1960 as a brilliant theoretical proof utilizing interlocking covering sets of prime congruences has evolved into one of the largest, most sustained distributed computing efforts in human history.

John Selfridge’s 1962 discovery of $k = 78557$ established the absolute baseline, and despite decades of aggressive computational searching by thousands of global volunteers, his conjecture that it is the smallest Sierpiński number remains flawlessly intact. The field has systematically stripped away candidates, transforming the original "Seventeen or Bust" initiative into the current "Five or Bust" reality.

As algorithmic efficiency improves and global computational power scales, the mathematical community steadily marches toward a definitive resolution of the five remaining candidates: 21181, 22699, 24737, 55459, and 67607. Whether a prime is eventually found for each, finally proving Selfridge right, or whether one of these five numbers stubbornly remains composite for all $n$, thereby rewriting number theory textbooks, the journey itself has fundamentally advanced our understanding of prime dynamics, modular coverings, and the very limits of computational mathematics.

References

  • [1] https://en.wikipedia.org/wiki/Sierpi%C5%84ski_number
  • [2] http://www.primegrid.com/forum_thread.php?id=13544
  • [3] https://primegrid.fandom.com/wiki/Extended_Sierpinski_Problem
  • [4] https://www.primegrid.com/
  • [5] https://www.primegrid.com/forum_thread.php?id=972
  • [6] https://www.primegrid.com/forum_thread.php?id=1647
  • [7] http://www.prothsearch.com/sierp.html
  • [8] https://primegrid.fandom.com/wiki/Prime_Sierpinski_Problem
  • [10] https://t5k.org/glossary/page.php?sort=SierpinskiNumber
  • [11] https://primegrid.fandom.com/wiki/Seventeen_or_Bust
  • [12] https://arxiv.org/abs/2106.07376
  • [13] https://math.colgate.edu/~integers/aa12/aa12.pdf
  • [14] https://math.dartmouth.edu/~carlp/BFLPST_AMS121001.pdf
  • [15] https://www.fq.math.ca/Papers1/49-4/BaczkowskiFasorantiFinch.pdf
  • [16] https://www.primegrid.com/forum_thread.php?id=1647
  • [18] http://www.primegrid.com/forum_thread.php?id=13544
  • [19] https://www.primegrid.com/forum_thread.php?id=1750
  • [20] https://www.primegrid.com/forum_thread.php?id=972
  • [21] https://www.primegrid.com/forum_thread.php?id=1538
  • [22] https://www.primegrid.com/forum_thread.php?id=9614
  • [23] https://www.primegrid.com/forum_thread.php?id=8360
  • [24] https://www.primegrid.com/forum_thread.php?id=13913
  • [27] https://grokipedia.com/page/primegrid
  • [28] https://grokipedia.com/page/Safe_and_Sophie_Germain_primes
  • [30] https://www.primegrid.com/forum_thread.php?id=13913
  • [33] https://www.primegrid.com/forum_thread.php?id=9614
  • [35] https://cs.uwaterloo.ca/journals/JIS/VOL10/Jones/jones67.pdf
  • [37] https://math.dartmouth.edu/~carlp/BFLPST_AMS121001.pdf
  • [38] https://en.wikipedia.org/wiki/Sierpi%C5%84ski_number
  • [39] https://grokipedia.com/page/covering_set
  • [40] https://en.wikipedia.org/wiki/John_Selfridge
  • [41] https://encyclopedia.pub/entry/37744
  • [46] https://boincsynergy.ca/wiki/PrimeGrid
  • [47] https://cs.uwaterloo.ca/journals/JIS/VOL10/Jones/jones67.pdf
  • [48] https://en.wikipedia.org/wiki/Sierpi%C5%84ski_number
  • [49] https://primegrid.fandom.com/wiki/Seventeen_or_Bust
  • [50] http://www.prothsearch.com/sierp.html
  • [51] https://www.primegrid.com/forum_thread.php?id=1647
  • [53] https://www.primegrid.com/forum_thread.php?id=972
  • [54] https://www.primegrid.com/forum_thread.php?id=8360
  • [55] https://www.primegrid.com/forum_thread.php?id=7767
  • [61] https://grokipedia.com/page/primegrid
  • [62] https://www.primegrid.com/forum_thread.php?id=13913
  • [63] https://www.primegrid.com/forum_thread.php?id=9614
  • [64] http://www.primegrid.com/old_news.php
  • [66] https://www.primegrid.com/forum_thread.php?id=1538
  • [67] https://www.primegrid.com/forum_thread.php?id=9614
  • [71] https://www.primegrid.com/forum_thread.php?id=1538
  • [72] http://www.primegrid.com/forum_thread.php?id=1304&nowrap=true
  • [78] https://www.epcc.ed.ac.uk/whats-happening/articles/how-do-you-solve-problem-sierpinski
  • [79] http://www.primegrid.com/old_news.php
  • [81] https://www.primegrid.com/forum_thread.php?id=7116
  • [82] Unknown Source / Custom Execution
  • [84] https://mathshistory.st-andrews.ac.uk/Biographies/Sierpinski/
  • [86] https://ns1.almerja.com/more.php?idm=80076
  • [89] https://www.primepuzzles.net/problems/prob_049.htm
  • [92] https://poetcommons.whittier.edu/cgi/viewcontent.cgi?article=1009&context=math
  • [94] http://www.prothsearch.com/sierp.html
  • [96] https://encyclopedia.pub/entry/37744
  • [98] https://www.primegrid.com/forum_thread.php?id=9614
  • [103] http://www.primegrid.com/forum_thread.php?id=7356
  • [104] https://www.primegrid.com/forum_thread.php?id=8513&nowrap=true&menu=top
  • [108] https://www.primegrid.com/forum_thread.php?id=9614
  • [109] https://boincsynergy.ca/wiki/PrimeGrid
  • [111] https://www.primegrid.com/forum_thread.php?id=1647
  • [113] https://math.colgate.edu/~integers/aa12/aa12.pdf
  • [116] https://poetcommons.whittier.edu/cgi/viewcontent.cgi?article=1009&context=math
  • [117] https://people.math.sc.edu/filaseta/papers/SierpinskiEtCoPap5.pdf
  • [118] https://oeis.org/A121270
  • [119] https://oeis.org/A121270/internal
  • [125] https://scispace.com/pdf/the-mathematics-of-paul-erdos-i-25xah963v8.pdf
  • [126] https://www.kurims.kyoto-u.ac.jp/~kyodo/kokyuroku/contents/pdf/1639-08.pdf
  • [128] https://en.wikipedia.org/wiki/Riesel_number
  • [129] https://www.researchgate.net/publication/256775044_On_Cullen_numbers_which_are_both_Riesel_and_Sierpinski_numbers
  • [131] https://people.math.sc.edu/filaseta/ConsecutiveWDDBrierNumbers.pdf
  • [132] https://arxiv.org/pdf/2101.08898

Thursday, 12 October 2023

Primitive Sets

The Erdős primitive set conjecture is that the following summation:$$ \sum _{n \, \in A} \frac {1}{n\log{n}}$$where A is any primitive set (a set where no member of the set divides another member) attains its maximum at the set of primes numbers. It was proved by Jared Duker Lichtman (pictured above) in 2022. I was informed of this via a YouTube video first released in 2022. Here is a link to the academic paper by Lichtman. The constant turns out to be about 1.6366 ... and summations of the form shown above can be no larger than this. Thus we have:$$ \sum _{p \, \in P} \frac {1}{p\log{p}} \approx 1.6366$$where P is the set of primes and \(p\) is any prime number.

Let's take the summation of the elements of the set S of semiprimes. These elements form a primitive set. Let's suppose each semiprime can be represented by its prime factors \(p\) and \(q\) where \(p \leq q\). We then have:$$ \sum _{pq \, \in S} \frac {1}{pq\log {pq}} \approx 1.1448 \dots$$We can continue this process and consider the primitive set containing all numbers with three not necessarily distinct prime factors and so on. In each case, the sum converges to a constant which can be designated as \(f_k\) where \(k\) represents the number of prime factors. Thus we've seen that \(f_1 \approx 1.6366\) and \(f_2 \approx 1.1448\). In general we write:$$f_k=\sum  \frac {1}{n\log{n}}\\ \text{where } n \text{ has } k \text{ prime factors}$$The long term behaviour of \(f_k\) is shown in Figure 1 where the term "fingerprint numbers" is used to identify these types of numbers:


Figure 1: screenshot from video

While the values of \(f_k\) initially decrease and drop below 1 for \(f_3\), it can be seen that the values bottom out around \(f_5\) and \(f_6\) and then increase slowly as they approach a value of 1 asymptotically from below. This behaviour can be seen more clearly in Figure 2.


Figure 2: screenshot from video

The term "fingerprint numbers" is an informal term used in the referenced videos and is not used formally in mathematical circles. There are many different types of primitive sets but they all have the property that no member of the set divides another member.

Thursday, 19 May 2022

Untouchable Numbers

I’ve dealt with untouchable numbers before but only in passing. I’ve never devoted an entire post to the topic. In my Mathematical Meandering blog on Blogger, I mentioned this category of numbers in two posts: one titled The Connectivity of Numbers and the other Mathematical Properties of 2022. My diurnal age today happens to be 26708 and this number turns out to be untouchable, meaning that there are no numbers whose sum of aliquot parts is equal to this number.

26798 is the 3470th untouchable number, meaning that the frequency of such numbers over this range is about 13%. As the range is extended, it has been shown that this density remains at least greater than 6% and Paul Erdos has shown that there are infinitely many untouchable numbers. These numbers are listed in OEIS A005114 and the sequence begins:

2, 5, 52, 88, 96, 120, 124, 146, 162, 188, 206, 210, 216, 238, 246, 248, 262, 268, 276, 288, 290, 292, 304, 306, 322, 324, 326, 336, 342, 372, 406, 408, 426, 430, 448, 472, 474, 498, 516, 518, 520, 530, 540, 552, 556, 562, 576, 584, 612, 624, 626, 628, 658, …

It should be noted that a number cannot be untouchable if it is one more than a prime number \( p \) because then it would be the sum of the aliquot parts of \( p^2 \). Similarly, if a number is three more a prime number \( p \), it cannot be untouchable because then it would be the aliquot sum of \( 2p \). More formally, we can say that untouchable numbers are those numbers that are not in the range of the aliquot sum function \( s(n) \) where \( n \) is any positive integer and \( d \) represents its divisors:$$s(n)=\sum_{d|n, d \neq n} \! \! \! d $$The conjecture is that 5 is the only odd untouchable number but this has not been proven. If true, then all untouchable numbers are composite except 2. Writing a program to generate untouchable numbers is not as simple as it might seem because some quite large numbers can have a relatively small aliquot sum. Below is an SageMath algorithm that will generate the untouchable numbers in the range from 26798 to 26750 (permalink). If the search range drops much below 500,000, “false positives” will begin to appear. Feel free to experiment.

Wednesday, 16 June 2021

Primes from Primes

I've begun reading "The Man Who Loved Only Numbers" by Paul Hoffman, a biography of Paul Erdös. Figure 1 shows the front cover of the book. It motivated me to be a little more energetic in my daily number analysis at least for today because today was a prime day.

Figure 1


THE STORY OF PAUL ERDÖS AND THE SEARCH FOR MATHEMATICAL TRUTH

***

By that I mean I turned a prime number of days old, specifically 26371. Initially, I'd found that this number was a member of OEIS A255543:


  A255543

Unlucky array: Row \(n\) consists of unlucky numbers removed at the stage \(n\) of Lucky sieve.


Figure 2, taken from the OEIS entry comments, shows what is meant by this:


Figure 2

Looking at the first row, it can seen that 2 and all multiples of 2 are removed. In the second row, every third remaining number is removed and so on for successive rows. 26371 lies in the 29th row that lists all the numbers removed when every 29th number is struck off. This was interesting but didn't relate to any specific properties of 26371 as a prime number. A little more research, motivated by Erdös's indefatigable research, led me to OEIS A249350:


 A249350

Prime numbers Q such that the concatenation Q, 6, Q is prime.   
           

As a member of this sequence, 26371 has the property that 26371626371 is a prime number. Up to 26371, the list of such primes is:
[13, 23, 29, 41, 53, 59, 71, 73, 89, 107, 149, 167, 173, 197, 239, 241, 257, 293, 349, 379, 383, 397, 439, 457, 461, 479, 503, 521, 547, 569, 607, 617, 631, 643, 677, 691, 727, 733, 757, 821, 887, 919, 941, 947, 953, 967, 1051, 1061, 1069, 1097, 1103, 1187, 1213, 1217, 1237, 1279, 1297, 1373, 1399, 1409, 1423, 1433, 1451, 1453, 1471, 1483, 1499, 1567, 1609, 1619, 1621, 1667, 1709, 1721, 1723, 1783, 1787, 1789, 1861, 1867, 1889, 1913, 1993, 1997, 2011, 2017, 2029, 2063, 2099, 2113, 2251, 2269, 2273, 2357, 2393, 2441, 2473, 2503, 2557, 2609, 2647, 2657, 2659, 2687, 2699, 2711, 2713, 2777, 2843, 2897, 2927, 2953, 3037, 3061, 3079, 3137, 3217, 3271, 3323, 3343, 3499, 3511, 3527, 3547, 3557, 3593, 3631, 3659, 3673, 3733, 3779, 3851, 3911, 4051, 4093, 4129, 4241, 4243, 4253, 4327, 4339, 4373, 4391, 4457, 4493, 4519, 4561, 4583, 4597, 4603, 4639, 4643, 4663, 4723, 4787, 4789, 4801, 4813, 4877, 4933, 4951, 4967, 5011, 5023, 5051, 5179, 5209, 5333, 5413, 5527, 5557, 5647, 5807, 5851, 5857, 5867, 5903, 6067, 6113, 6173, 6199, 6311, 6353, 6379, 6553, 6571, 6659, 6781, 6827, 6841, 6871, 6949, 6997, 7013, 7079, 7151, 7177, 7193, 7237, 7349, 7393, 7459, 7481, 7523, 7529, 7541, 7559, 7573, 7589, 7607, 7621, 7673, 7687, 7793, 7817, 7823, 7841, 7867, 7873, 7907, 8087, 8093, 8101, 8209, 8317, 8369, 8387, 8419, 8429, 8447, 8461, 8467, 8573, 8623, 8647, 8677, 8681, 8699, 8741, 8779, 8803, 8821, 8861, 8971, 8999, 9013, 9059, 9133, 9137, 9181, 9199, 9239, 9283, 9337, 9343, 9419, 9431, 9461, 9473, 9511, 9533, 9539, 9629, 9767, 9883, 10103, 10133, 10223, 10357, 10487, 10559, 10691, 10729, 10847, 10853, 10909, 10957, 10979, 11083, 11093, 11117, 11159, 11177, 11243, 11273, 11321, 11329, 11369, 11393, 11471, 11483, 11489, 11491, 11813, 11887, 12007, 12049, 12119, 12211, 12239, 12253, 12281, 12289, 12379, 12413, 12479, 12517, 12527, 12553, 12647, 12703, 12721, 12889, 12919, 13003, 13037, 13043, 13147, 13163, 13171, 13381, 13499, 13679, 13757, 13877, 14009, 14051, 14057, 14071, 14081, 14207, 14423, 14449, 14627, 14723, 14767, 14813, 14869, 14879, 14939, 15031, 15061, 15101, 15131, 15173, 15193, 15299, 15373, 15377, 15383, 15541, 15559, 15629, 15643, 15649, 15787, 15877, 15919, 15923, 16189, 16333, 16339, 16361, 16427, 16487, 16529, 16607, 16649, 16763, 16871, 16903, 16931, 17011, 17021, 17029, 17033, 17077, 17137, 17419, 17483, 17729, 17747, 17749, 17851, 17903, 17921, 17957, 17981, 18041, 18049, 18169, 18257, 18397, 18413, 18517, 18541, 18583, 18671, 18691, 18701, 18719, 18749, 18757, 18803, 18973, 19069, 19211, 19213, 19289, 19379, 19463, 19471, 19489, 19603, 19819, 19843, 19861, 19919, 20071, 20101, 20147, 20261, 20297, 20399, 20443, 20681, 20707, 20731, 20849, 20897, 20921, 20939, 21001, 21011, 21059, 21089, 21121, 21163, 21169, 21221, 21227, 21313, 21341, 21401, 21407, 21467, 21523, 21569, 22109, 22129, 22171, 22247, 22349, 22639, 22643, 22741, 22769, 22787, 22811, 22961, 23027, 23041, 23143, 23201, 23203, 23339, 23357, 23369, 23459, 23537, 23627, 23629, 23747, 23767, 23819, 23857, 23879, 23887, 24007, 24019, 24029, 24061, 24097, 24151, 24391, 24407, 24421, 24683, 24767, 24851, 24953, 25033, 25147, 25253, 25321, 25439, 25643, 26119, 26189, 26237, 26357, 26371]

26371 is the 2897th prime and the primes listed above total 502. This means that of all the primes up 26371, 502 or about 16.8% generate a new prime according the Q + 6 + Q concatenation. I wondered what numbers arise when the digits 1, 2, 3, 4, 5, 7, 8 and 9 are used instead. Inserting 0 between the two primes cannot produce a prime because the resulting concatenated number is always divisible by Q. Here are the figures for the digits from 1 to 9:

1     278
2     238
3     528
4     242
5     258
6     502
7     296
8     247
9     512

total is 3101

It can be seen that the record is held by the digit 3, although 6 and 9 are close behind. Well back however, are the digits 1, 2, 4, 5, 7 and 8. I thought I'd extend this to the first one million primes and Figure 3 shows the results obtained:


Figure 3

The proportions remain about the same with the exception of the digit 7. Figure 4 shows a table summarising the results:


Figure 4

Why do the digits 3, 6 and 9 produce about twice as many primes as the digits 1, 2, 4, 5 and 8? Why does the digit 7 produce significantly fewer primes that 1, 2, 4, 5 and 8? These are questions that I don't know the answer to but I'm keen to investigate.

One doesn't have to stop at the digit 9. What happens for the digits 10 to 19? Figure 5 tells the tale.


Figure 5

Figure 6 shows the same results in tabular form. It's clear that the multiples of 3 (12, 15 and 18) always win the day and with consistent frequency. The digits 10, 16 and 17 produce about half as many primes as their multiple of 3 counterparts, while 11, 13, 14 and 19 produce less than a third of even this number.


Figure 6

One might surmise that the frequency for multiples of 3 remains relatively constant as we investigate higher digits. After all, the numbers for 3, 6, 9, 12, 15 and 18 have been quite consistent. However, 21 = 3 x 7 breaks the pattern. See Figure 7.


Figure 7

The figure for 21 is not as low as for 22, 26 and 28 but it significantly lower than even the figures for 20, 23, 25 and 29. Figure 8 presents the results in tabular form.


Figure 8

Multiples of 7, 11 and 13 seem to produce far fewer primes when concatenated using Q + digit + Q. Figure 9 provides an overview of the digits from 1 to 99:


Figure 9

Clearly, there is more to be discovered here but I'll finish up at this point. What this post teaches us more than anything else is to not let a good prime go to waste and to be a little more energetic in my investigations.

Sunday, 2 August 2020

The Greedy Algorithm

I started browsing a book by David Wells called The Penguin Book of Curious and Interesting Puzzles. The first book that I encountered by this author was Prime Numbers:  The Most Mysterious Figures in Math and it is a most interesting book. A brief biography at the start of the this Penguin book informs us that:
David Wells was born in 1940. He had the rare distinction of being a Cambridge scholar in mathematics and failing his degree. He subsequently trained as a teacher and, after working on computers and teaching machines, taught mathematics and science in a primary school and mathematics in secondary schools. He is still involved with education through writing and working with teachers. While at university he became British under-21 chess champion, and in the mIddle seventies was a game inventor, devising 'Guerilla' and 'Checkpoint Danger', a puzzle composer, and the puzzle editor of Games & Puzzles magazine. From 1981 to 1983 he published The Problem Solver, a magazine of mathematical problems for secondary pupils. He has published several books of problems and popular mathematics, including Can You Solve These? and Hidden Connections, Double Meanings, and also Russia and England, and the Transformations of European Culture. He has written The Penguin Dictionary of Curious and Interesting Numbers and The Penguin Dictionary of Curious and Interesting Geometry, and is currently writing a book on the nature, learning and teaching of mathematics.
One of the first topics he deals with is Egyptian Fractions which consist only of unit fractions, meaning fractions with a numerator of 1. For example, the Egyptians would have expressed the fraction \( \frac{7}{10} \) as \( \frac{1}{2}+ \frac{1}{5} \).

The author then asks the question: 
Can all proper fractions be expressed as the sum of unit fractions, without repetition? 
The answer is: 
Yes, as Fibonacci showed, also in his Liber Abaci, where he described what is now called the greedy algorithm. Subtract the largest possible unit fraction, then do the same again, and so on. Sylvester proved in 1880 that applying this greedy algorithm to the fraction \( \frac{p}{q} \), where \(p\) is less than \(q,\) produces a sequence of no more than \(p\) unit fractions.
The site CODESDOPE provides the Python code to generate an Egyptian fraction from an improper fraction. Here is the code, applied to the fraction \( \frac{5}{7} \), together with its output:

import math

unit_den_array = [0]*10
iter = 0

def gcd(a, b):
  c = a%b
  while(c > 0):
    a = b
    b = c
    c = a % b
  return b

def greedy_egyptian_fraction(num, den):
  global iter
  if(num == 1):
    #appending list unit_den_array
    iter = iter+1 # storing in unit_den_array from index 1 not 0
    unit_den_array[iter] = den
  else:
    unit_den = math.ceil(den/num)
    iter = iter+1
    unit_den_array[iter] = unit_den
    gcd_of_numbers = gcd((num*unit_den) - den, den*unit_den)
    greedy_egyptian_fraction(((num*unit_den) - den)//gcd_of_numbers, (den*unit_den)//gcd_of_numbers)

if __name__ == '__main__':
  greedy_egyptian_fraction(5, 7)
  for i in range(1, iter+1):
    print(unit_den_array[i])

2
5
70

There is a lot of code and the contrast with the amount of code needed for SageMath could not be more stark. Here is code required for SageMath to accomplish exactly the same task:

L=[]
n=5/7
while n>0:
    bottom=ceil(denominator(n)/numerator(n))
    L.append(bottom)
    n=n-1/bottom
print(L)

[2, 5, 70]

While I am inclined to become more proficient in the use of Python, I am at the same time aware of how much more SageMath is suited to performing mathematical tasks, as the example of Egyptian fractions illustrate. Why go through a painful Python procedure to generate an outcome that SageMath can achieve almost effortlessly. It took me a few minutes to generate the SageMath code but I'm sure I would have struggled for much longer if I had only Python code to rely on. Here is the permalink to SageMathCell.

As the CODESDOPE observes in Figure 1:

Figure 1

My SageMath algorithm has provided the first representation but not the second. The latter is preferable in one way because the maximum denominator is much smaller (21 versus 70). Another way to generate an Egyptian fraction is by determining the Engel expansion for the proper fraction. I posted about the Engel expansion on the 26th September 2016. For an explanation of what this expansion is all about, see Figure 2.

Figure 2


The algorithm I developed to generate the Engel expansion for any positive real number is shown below, using \( \frac{5}{7} \) as an example (permalink):

x=5/7
u=x
E=[1]
F=[]
product=1
sum=0
for i in [1..10]:
    if u==0:
        break
    else:
        a=ceil(1/u)
    u=u*a-1
    E.append(a)
    product=product*a
    sum+=1/product
    F.append(1/product)
print("Engel expansion is",E)
print("Fraction expression is",F)

Engel expansion is [1, 2, 3, 4, 7]
Fraction expression is [1/2, 1/6, 1/24, 1/168]

So additionally \( \frac{5}{7}= \frac{1}{2}+ \frac{1}{6}+ \frac{1}{24}+ \frac{1}{168} \). Interestingly, I discovered on this website about proper fractions of the form \( \frac{4}{n} \) and \( \frac{3}{n} \). To quote from the site:
In the 1940s, the mathematicians Paul Erdos and Ernst G. Straus conjectured that every fraction with numerator = 4 can be written as an Egyptian fraction sum with three terms. If you have found an example that appears to need more than three, can you find an alternative sum? Can you find a reason why it must work, or a counter-example - the conjecture isn't yet proved. It is proved for \( \frac{3}{n} \).
Testing this out on \( \frac{3}{7} \), we find an Egyptian fraction of \( \frac{1}{3}+ \frac{1}{11}+\frac{1}{231}\). I'm sure there's a lot more that can be said about Egyptian fractions but I'll finish up here and maybe return to the topic at a later date. Figure 3 shows how the Egyptians connected the senses with fractions that had powers of 2 as denominators.

Figure 3

It can be noted that \( \frac{1}{2}+\frac{1}{4}+\frac{1}{8}+\frac{1}{16}+\frac{1}{32}+\frac{1}{64}=\frac{63}{64}\)