Tuesday, 22 September 2026

Zipf's Law

Comprehensive Analysis of Zipf's Law: Formulation, Historical Evolution, and Interdisciplinary Applications


Zipf’s law stands as one of the most rigorously studied and universally observed empirical regularities in the quantitative sciences. Initially formulated to describe the inverse relationship between the frequency of a word and its rank in a linguistic corpus, the law has transcended its origins in philology to become a foundational principle in statistical physics, complexity theory, economics, information retrieval, and systems biology. This report provides an exhaustive, expert-level examination of Zipf's law. It synthesizes the historical trajectory of its formulation, its strict mathematical properties, the generative stochastic mechanisms that produce it, and its expansive applications across diverse disciplines.

Historical Evolution and Formative Figures

While universally recognized by the moniker "Zipf’s law," the mathematical regularity of rank-frequency distributions was independently observed by multiple scholars across various disciplines decades before George Kingsley Zipf published his seminal works. The formalization of the law represents a cumulative scientific effort.

Precursors to Zipf: Estoup, Auerbach, Lotka, and Condon

The earliest recorded recognition of this inverse proportionality in textual data belongs to the French stenographer Jean-Baptiste Estoup, who noted around 1912 and 1916 that the frequency of words in French documents followed a highly predictable decay when ranked. Concurrently, the rank-size phenomenon was identified in demographics. In 1913, the German physicist Felix Auerbach published a treatise demonstrating that the population sizes of German cities were inversely proportional to their rank. Auerbach introduced the concept of "absolute concentration," observing that the product of a city's rank and its population size remained approximately constant.

The visual and mathematical formalization of this demographic pattern was further advanced by Alfred Lotka in 1925. Lotka, working within the framework of physical biology, was the first to graph the rank-size rule using the log-log plots that are standard today. Following Lotka, M. Saibante expanded this methodology in 1928, investigating the rank-size rule across different regions and time periods. In the realm of linguistics, other early observations were recorded by G. Dewey in 1923 and the physicist Edward Condon in 1928, confirming the existence of the rank-frequency phenomenon across multiple independent datasets. Modern historians of science occasionally advocate for the term "Auerbach-Lotka-Zipf law" (ALZ-law) in urban economics to properly attribute the phenomenon's discovery.

George Kingsley Zipf and the Principle of Least Effort

George Kingsley Zipf (1902–1950) was an American linguist and philologist who earned his degrees at Harvard University and studied at the Universities of Bonn and Berlin. Serving as the chairman of the German department at Harvard, Zipf dedicated his academic career to the statistical analysis of language. Although he never claimed to have discovered the rank-frequency rule, his extensive empirical validations and theoretical frameworks popularized it globally.

In his 1932 publication Selected Studies of the Principle of Relative Frequency in Language, and subsequently in his 1935 book The Psycho-Biology of Language, Zipf demonstrated that word frequencies in vastly different corpora—including American newspapers, the Latin works of Plautus, and Peiping Chinese—all rigidly adhered to the rank-frequency law. Zipf visualized this by plotting the item frequency data on a log-log graph, revealing an affine function with a slope approximating ‭$-1$‬.

Zipf’s crowning theoretical achievement was published in 1949: Human Behavior and the Principle of Least Effort. He hypothesized that the rank-frequency distribution was not a statistical anomaly but a fundamental consequence of a psychobiological drive to minimize work. According to the Principle of Least Effort, communication is constrained by a compromise between two conflicting economic pressures:

1. Speaker's Economy (Unification): The speaker, seeking to expend the least amount of cognitive and articulatory effort, prefers a highly contracted vocabulary where a single, versatile word functions across multiple contexts.

2. Auditor's Economy (Diversification): The hearer, seeking to minimize the cognitive burden of disambiguation, prefers a highly expanded vocabulary where every distinct concept is paired with a unique, unambiguous word.

Zipf proposed that the resulting power-law distribution—characterized by a tiny core of highly frequent words and an immense "long tail" of extremely rare words—represents the exact dynamic equilibrium between these two competing evolutionary forces.

Benoit Mandelbrot and Information Theory

In 1953, the mathematician Benoit Mandelbrot significantly refined Zipf's empirical model by integrating it with Claude Shannon's information theory. Mandelbrot argued that if language is viewed as a sequence of symbols transmitted across a channel, the distribution of word frequencies naturally organizes to minimize the average coding cost per word. Mandelbrot identified that the pure Zipfian formula often failed to accurately model the frequencies of the highest-ranked (most common) items in empirical datasets. To correct this, he introduced a mathematical shift parameter, establishing what is now known as the Zipf-Mandelbrot law.

Key FigureContribution to the Formulation of Zipf's LawRelevant Domain
Jean-Baptiste EstoupFirst observed the rank-frequency relationship in textual data (1912–1916).Linguistics / Stenography
Felix AuerbachDiscovered the inverse proportionality of city sizes and rank (1913).Demographics / Geography
Alfred LotkaPioneered the log-log rank-size plot for population modeling (1925).Physical Biology
George Kingsley ZipfPopularized the law through extensive multi-language corpora analysis and proposed the Principle of Least Effort (1932, 1949).Quantitative Linguistics
Benoit MandelbrotGeneralized the formula with a shift parameter based on information theory and coding cost minimization (1953).Mathematics / Information Theory

Mathematical Foundations and Statistical Properties

Zipf’s law is a discrete power-law probability distribution. Its mathematical architecture is closely related to continuous Pareto distributions and infinite Zeta distributions. Understanding the precise statistical mechanics of the law is necessary for evaluating its presence in empirical data.

Probability Mass Function and the Zeta Distribution

In its canonical form, Zipf's law dictates that the frequency ‭\(f\) of an item is inversely proportional to its rank ‭\(r\)‬. If ‭\(N\)‬ is the total number of distinct items (e.g., the vocabulary size), the probability mass function (PMF) assigns to the element of rank ‭\(k\)‬ the probability:$$P(k) = \dfrac{\dfrac{1}{k^s}}{\sum_{i=1}^{N} \dfrac{1}{i^s}}$$where ‭\(s\)‬ is the scaling exponent, which empirically clusters around 1 for natural languages. The denominator serves as the normalization constant and is mathematically defined as the ‭\(N\)‬-th generalized harmonic number, denoted as ‭\(H_{N,s}\)‬. Because the classic Zipf distribution describes a finite set of ‭\(N\)‬ items, it is characterized as a truncated or bounded discrete power law.

If the model is extended to accommodate an infinitely large vocabulary (‭\(N \to \infty\)), the generalized harmonic number diverges unless the exponent ‭$s > 1$‬. When ‭$s > 1$‬, the normalization constant converges to the Riemann zeta function ‭$\zeta(s)$‬:$$\zeta(s) = \sum_{i=1}^{\infty} \frac{1}{i^s}$$In this infinite-item limit, the distribution is formally defined as the Zeta distribution (also referred to as Lotka's law). The transition from Zipf's law to the Zeta distribution shifts the model from relying on discrete rank-based probabilities dependent on finite corpus sizes to a continuous mathematical spectrum.

The Zipf-Mandelbrot Generalization

The Zipf-Mandelbrot law introduces a non-negative shift parameter ‭$q$‬ (or ‭$\beta$‬) to account for the flattening often observed at the uppermost ranks of empirical frequency tables. The PMF is given by:$$f(k, N, q, s) = \frac{\frac{1}{(k+q)^s}}{H_{N, q, s}}$$where ‭\( H_{N, q, s}\) is a generalized normalization constant. As the upper bound ‭\(N\)‬ approaches infinity, this normalization factor converges to the Hurwitz zeta function. The inclusion of ‭\(q\) allows the Zipf-Mandelbrot model to achieve highly accurate fits for closed-class functional words (e.g., determiners, pronouns) whose extreme high frequencies do not conform to a strictly linear decay on a log-log plot.

Methodologies for Parameter Estimation

Historically, Zipf's law was tested by applying an Ordinary Least Squares (OLS) linear regression to log-transformed rank and frequency data. However, this method has been demonstrated to produce statistically biased estimators. Contemporary statistical methodologies require the use of Maximum Likelihood Estimation (MLE) to fit the exponent ‭$s$‬ and the shift parameter ‭$q$‬. Following parameter estimation, goodness-of-fit is typically evaluated using the Kolmogorov-Smirnov test to calculate the maximum distance between the empirical cumulative distribution function (CDF) and the theoretical model. Likelihood ratio tests are then deployed to compare the power-law fit against competing distributions, such as the log-normal or Yule-Simon models, ensuring that the tail behavior is genuinely Zipfian rather than merely skewed.

Theoretical Generative Mechanisms

The persistent recurrence of Zipfian power laws across systems as disparate as neuronal firing rates, astrophysical phenomena, and linguistic structures suggests that the law is not an isolated artifact but the product of fundamental dynamic processes inherent to complex systems.

Preferential Attachment and the Yule-Simon Process

One of the most robust generative mechanisms for Zipf's law is preferential attachment, frequently summarized as the "rich get richer" dynamic. This mechanism is formalized mathematically as the Yule-Simon process. Initially derived by Udny Yule to model the distribution of species within biological genera, Herbert Simon later adapted the process to explain the distributions of word frequencies and city populations.

In a linguistic context, the Yule-Simon model operates under two stochastic rules during text generation. First, a previously used word is repeated with a probability directly proportional to the number of times it has already appeared. Second, entirely new words are introduced at a constant, albeit low, rate. Over time, the continuous compounding of the initial frequency advantages guarantees that the distribution will converge into a heavy-tailed power law mathematically mirroring the Zipfian distribution.

Network Phase Transitions and System Criticality

A more profound explanation roots Zipf's law in the physics of critical phenomena and optimization. In 2003, researchers Ferrer-i-Cancho and Solé mathematically modeled Zipf's Principle of Least Effort by designing an artificial language game. They constructed an energy function that combined the entropic costs for the speaker (who desires a minimal vocabulary) and the hearer (who desires minimal ambiguity).

Through computational simulation, they discovered that as the communication system optimizes to balance these two competing efforts, it undergoes a sharp phase transition. At a critical parameter threshold, the system rapidly shifts from a disorganized, referentially useless state into an optimized, scale-free syntax network. Precisely at this critical point of transition, Zipf's law emerges spontaneously. This indicates that the exponent of ‭$-1$‬ is a hallmark of true symbolic reference and highly optimized structural networks, rather than a mere statistical curiosity.

The Random Generation Critique

Conversely, the necessity of complex evolutionary or cognitive optimization for producing Zipf's law has been vigorously challenged. In 1992, bioinformatician Wentian Li published a seminal critique demonstrating that Zipf's law arises naturally from completely random text generation. Li mathematically proved that if a "monkey" types randomly on a keyboard containing letters and a space character with fixed probabilities, the resulting sequence of characters separated by spaces (pseudo-words) will conform perfectly to Zipf's law. Because short strings of characters have exponentially higher probabilities of being generated than long strings, ranking them by frequency inherently creates an inverse power-law decay. While this demonstrates that the macro-trend of Zipf's law can be a byproduct of sample space geometry, linguists maintain that true human language features deep semantic and syntactic hierarchies that distinguish it entirely from Markovian random generation.

Linguistic and Cognitive Manifestations

In quantitative linguistics, Zipf's law provides a framework for analyzing structural universals, morphological typologies, and the cognitive mechanics of human communication.

Zipf's Law of Abbreviation

A direct corollary of the rank-frequency rule is Zipf's Law of Abbreviation, which dictates an inverse correlation between a word's magnitude (its length in characters, phonemes, or temporal duration) and its frequency of occurrence. Frequent function words, such as "the" and "of," are structurally short, allowing for rapid articulation and reduced cognitive load.

This principle operates as a fundamental language universal. Extensive cross-linguistic studies analyzing over 1,200 texts across 986 distinct languages (encompassing approximately 13% of the world's linguistic diversity) consistently yielded a significant negative correlation between word length and frequency. Remarkably, this optimization for efficiency extends down to the orthographic level. A comprehensive analysis of 27 varied writing systems revealed that the visual and motor complexity of individual written characters is inversely proportional to their usage frequency, confirming that human communication networks continuously optimize to minimize cumulative production costs.

Attempts to locate the Law of Abbreviation in non-human animal communication have yielded mixed results. While some studies identify Zipfian abbreviation in the vocal repertoires of specific songbirds, hyraxes, and cetaceans, the negative correlation between phrase length and frequency in animals is consistently several times weaker than the correlations observed in human written language, partly due to the highly restricted size of animal vocal repertoires.

Morphological Typology and the Grammatical Fingerprint

The specific value of the scaling exponent ‭$s$‬ in a language's Zipfian distribution acts as a quantitative "grammatical fingerprint," highly sensitive to the language's morphological typology.

Analytic and isolating languages (such as Modern English or Mandarin) rely on independent particles, adpositions, and strict word order to convey grammatical relationships, resulting in a low ratio of morphemes per word. Consequently, a relatively small set of free morphemes occurs with extreme frequency, producing a steep Zipfian slope. Conversely, agglutinative languages (like Turkish or Yakut) and fusional languages (like Latin or Old English) construct highly synthetic words by attaching multiple bound affixes to single roots to convey case, gender, tense, and number. Because a single verb root can manifest in hundreds of distinct inflected forms, the token counts are widely dispersed across a massive vocabulary of unique types, resulting in a significantly flatter rank-frequency distribution. Diachronic quantitative studies comparing the Old English and Modern English translations of the Book of Genesis have successfully tracked this historical language change, mathematically capturing the loss of synthetic inflectional marking through the steepening of the Zipfian exponent.

Ontogeny, Pathology, and Double Regimes

The parameters of Zipf's law are not static within an individual; they evolve dynamically during cognitive maturation. Longitudinal studies of child language acquisition demonstrate that the exponent of the Zipf distribution decreases steadily as children age. This decrease strongly correlates with an increase in the Mean Length of Utterance (MLU), indicating that as syntactical complexity and vocabulary diversity expand, the reliance on a narrow set of ultra-frequent repetitive words diminishes. Furthermore, structural deviations from a normative Zipfian baseline have been identified in psychiatric and neurological contexts, with altered exponents observable in the speech patterns of patients suffering from schizophrenia and aphasia.

Modern corpus analysis has also revealed that human lexicons are rarely captured by a single, monolithic power law. Extensive datasets typically expose a "double Zipf" distribution, featuring two distinct regimes. The core vocabulary of high-frequency words follows one scaling exponent, while a distinct regime shift occurs in the long tail of low-frequency words and hapax legomena (words occurring exactly once), which scale under a different exponent. This two-regime structure reflects a dual cognitive mechanism: an optimized, highly navigable core of grammatical function words, coupled with a suboptimal, expansive tail of semantic nouns and specialized vocabulary designed for unlimited conceptual expression.

Applications in Information Retrieval and NLP

The heavy-tailed mathematical reality of language requires sophisticated algorithmic interventions in computer science. Modern search engines, databases, and generative artificial intelligence systems are structurally designed to navigate the Zipfian distribution of human data.

Subword Tokenization and Vocabulary Design

In the architecture of Large Language Models (LLMs) like GPT and LLaMA, raw text is segmented into processing units using subword tokenization algorithms, predominantly Byte-Pair Encoding (BPE). BPE operates by scanning a training corpus, calculating the frequencies of adjacent byte pairs, and greedily merging the most frequent pairs into single tokens until a predefined vocabulary size (often between 30,000 and 200,000 tokens) is reached.

The arbitrary selection of vocabulary size has massive implications for model performance, training cost, and embedding matrix memory limits. Recent research has demonstrated a principled method for hyperparameter selection based directly on Zipf's law. As vocabulary size increases during BPE training, the rank-frequency distribution of the resulting tokens becomes increasingly linear on a log-log scale. Empirical experiments across NLP, genomic sequences, and chemical string representations (like SMILES for molecules) indicate that downstream model performance reaches its absolute peak precisely when the token distribution achieves maximum alignment with Zipf's law. Zipfian alignment functions as a robust, modality-agnostic diagnostic criterion for subword vocabulary design, preventing excessive word fragmentation while mitigating the redundancy of an overly expansive token set.

Search Algorithms: TF-IDF and BM25

In information retrieval, simply counting the frequency of a query term within a document leads to severe ranking failures, as Zipf's law dictates that structural words ("the," "is," "and") will dominate the results. To counteract this, systems employ the Term Frequency-Inverse Document Frequency (TF-IDF) algorithm. While the Term Frequency (TF) component measures local relevance by counting occurrences within a specific document, the Inverse Document Frequency (IDF) component measures global rarity across the entire corpus. Because the IDF is scaled logarithmically, ultra-frequent Zipfian terms are mathematically penalized, allowing the retrieval engine to isolate the rare, high-information semantic terms.

The Best Match 25 (BM25) algorithm, the default scoring model for massive search engines like Elasticsearch, builds upon TF-IDF to address the asymptotic behavior of term repetition. Under pure TF-IDF, a document containing the word "elephant" 200 times receives double the score of a document containing it 100 times. BM25 rectifies this by introducing "term frequency saturation," regulated by the hyperparameter ‭$k_1$‬. This forces the relevance score to approach a bounded asymptote, acknowledging that once a document is saturated with a term, further repetitions yield diminishing informational returns. Additionally, BM25 normalizes for document length using the hyperparameter ‭$b$‬, ensuring that long documents do not receive an unfair ranking advantage merely because their length affords more opportunities for term inclusion.

Retrieval AlgorithmMechanism for Handling Zipfian FrequenciesKey Hyperparameters
TF (Term Frequency)None. Susceptible to domination by high-frequency function words.N/A
TF-IDFPenalizes globally frequent words using logarithmic document frequency scaling.N/A
BM25Implements non-linear term frequency saturation and document length normalization.k_1 (saturation), b (length normalization)


Mooers’s Law of Information Avoidance

Operating as an inverse psychological corollary to Zipf's Principle of Least Effort, the American computer scientist Calvin Mooers formulated Mooers's Law in 1959 regarding user behavior in information retrieval. Mooers posited that an information retrieval system will not be used if obtaining and processing the information is more painful and troublesome than not having it. Because interpreting new data requires cognitive exertion and may challenge existing operational paradigms, humans naturally gravitate toward the path of least resistance. Consequently, regardless of how effectively an algorithm manages Zipfian keyword distributions, the system will face user abandonment if it induces high cognitive friction.

Economic and Demographic Applications

The mathematics of preferential attachment that govern word frequencies exert an equally profound influence on macroeconomic structures, directing the distribution of urban populations and corporate entities.

Firm Sizes and Economic Concentration

For decades, classical economic models assumed that the size distribution of firms followed a log-normal curve, a theory supported by early analyses of limited datasets of large public companies (such as the COMPUSTAT database) and heavily influenced by Gibrat's law of proportional effect. Gibrat's law posits that a firm's growth rate is a random variable entirely independent of its initial size.

However, a paradigm-shifting 2001 study by Robert Axtell analyzed the complete population of U.S. tax-paying entities—encompassing over 5.5 million firms—and proved definitively that the distribution of firm sizes is not log-normal, but rather a nearly perfect Zipf distribution with an exponent approximating unity. The log-normal hypothesis failed because previous databases had artificially truncated the data by excluding millions of micro-enterprises.

The coexistence of Gibrat's law of proportional growth and Zipf's law is mathematically resolved by integrating the boundary conditions of the market. If an economy features a continuous influx of new entrants (births) and a strict minimum viability threshold below which shrinking firms go bankrupt (deaths), the long-term steady-state distribution of proportional growth inevitably shifts from log-normal into a heavy-tailed Zipfian power law. In practical terms, this dictates severe market concentration: a microscopic tier of massive corporations commands a vastly disproportionate share of total revenue and employment, coexisting alongside a massive, heavily populated long tail of highly volatile small firms.

Zipf's law is similarly prevalent in financial markets. Empirical analyses of global public companies demonstrate that both share prices and fundamental corporate indicators (such as dividends per share, cash flow, and book value) follow Zipfian power laws. Panel regression models indicate that the Zipfian distribution of share prices is causally driven by the underlying Zipfian distribution of corporate fundamentals.

Urban Geography and City Size Distributions

In urban economics, Zipf's law manifests as the "rank-size rule," originally noted by Auerbach in 1913. Across most nations, the population of a city is inversely proportional to its rank; the second-largest city will invariably be half the size of the largest, the third-largest a third of the size, and so forth.

In 1999, economist Xavier Gabaix provided the definitive theoretical explanation for this phenomenon by applying Gibrat's law to urban demographics. Gabaix mathematically proved that if all cities in an integrated economic system grow at randomly fluctuating rates, but share the same expected mean growth rate and variance regardless of their baseline population, the forward Kolmogorov equation dictates that the steady-state limit distribution of the city populations will converge exactly to Zipf's law. Zipf's law therefore serves as a strict, non-negotiable admissibility criterion for any theoretical model attempting to simulate local urban growth.

Genomics, Ecology, and Neuroscience

The organizational principles underlying Zipf's law are scale-invariant, emerging at the microscopic level of intracellular biology and the macroscopic level of species diversity.

Systems Biology and Transcriptomics

In genomics, the frequency of short nucleotide sequences ("DNA words"), the occurrence of pseudogenes, and the distribution of protein families within an organism all exhibit steep power-law decays.

Most notably, Zipf's law governs transcriptomics. Analyses of gene expression databases spanning yeast, nematodes, human normal tissues, cancer cells, and embryonic stem cells consistently reveal that the abundance of expressed mRNA transcripts follows a Zipfian distribution with an exponent close to ‭$-1$‬. Through computational modeling of intracellular reaction networks, researchers have demonstrated that this distribution is a universal signature of an optimized cellular metabolism. When a cell's catalytic reaction network successfully balances the rapid diffusion of external nutrients with the hierarchical synthesis of complex, impenetrable internal chemicals required for faithful self-reproduction, the chemical concentrations spontaneously organize into a Zipfian power law.

Ecology: Relative Abundance Distributions

In macroecology, the Relative Abundance Distribution (RAD) or Species Abundance Distribution (SAD) acts as one of the discipline's oldest universal laws. Field studies consistently produce a "hollow curve" or hyperbolic histogram indicating that an ecosystem is dominated by a few highly abundant species, while the vast majority of species are rare. To model the uneven allocation of abundance in heterogeneous environments, ecologists utilize the Zipf-Mandelbrot law. The scaling parameters ‭$q$‬ (representing niche availability or habitat diversity) and ‭$s$‬ (indicating the steepness of dominance) serve as vital indices for monitoring biodiversity, modeling post-disturbance successional stages, and guiding conservation efforts.

Neuroscience: Neural Avalanches and Criticality

In computational neuroscience, the statistical mechanics of Zipf's law govern the firing rates of the cerebral cortex. Observations of "neuronal avalanches"—synchronized bursts of action potentials across neural assemblies—demonstrate that the probability of a specific neural firing pattern occurring is inversely proportional to its rank frequency.

This reflects the brain operating at "criticality," a continuous phase transition poised precisely between highly ordered, rigid synchronization (analogous to an epileptic seizure) and chaotic, uncorrelated noise. In vivo cortical neurons operate under severe metabolic energy restrictions. Traditional computing systems operate via Maximization of Mutual Information (MMI), which requires high energy to establish rigid, error-free communication bands. Conversely, the brain utilizes Conditional Maximization of Firing-rate Entropy (CMFE), balancing severe energy limitations with the need for high informational variety. By adopting a heavy-tailed, Zipfian distribution of inter-spike intervals, the cortex sacrifices absolute signal accuracy to transmit a maximally rich repertoire of patterns with minimal metabolic expenditure, realizing Zipf's Principle of Least Effort at the neurobiological level.

Cultural and Technological Phenomena

The mechanisms of preferential attachment naturally extend to human culture and technological infrastructure, dictating the distribution of creative output and digital traffic.

Music and Acoustic Context

While music lacks a functional, explicit semantic layer, researchers have successfully identified Zipfian regularities in musical compositions by treating generalized acoustic combinations as rankable tokens. When a musical score is parsed—treating a "note" as a specific duration-pitch pair, and a "chord" as a simultaneous execution of harmonically related notes—the frequency of these events follows the Zipf-Mandelbrot law.

Similar to Simon's textual model, music generation relies on "context". The probability of a composer repeating a specific melodic interval or generalized chord is proportional to the number of times it has already appeared in the piece, ensuring thematic cohesion. Empirical analyses of hundreds of MIDI files demonstrate an exponent hovering near 1 for musical scores, whereas artificially generated control pieces composed of white or pink noise fail to exhibit deep Zipfian scaling.

Internet Traffic and Content Delivery Networks (CDNs)

The architecture of the modern internet is heavily influenced by Zipf's law. Because the popularity of web pages, video views, and social media interactions strictly adhere to Zipfian and Pareto distributions (the 80/20 rule), a microscopic fraction of global domains commands the overwhelming majority of internet bandwidth.

This structural inequality allows for highly efficient network engineering. Content Delivery Networks (CDNs) and web caching protocols rely on Zipfian workload models to function. Because demand is non-uniform, CDNs only need to store copies of the highest-ranked assets (the steep head of the Zipf distribution) on local edge servers to achieve massive cache hit probabilities, radically reducing latency and backbone network congestion.

Conclusion

Zipf’s law transcends its origins as a mere statistical curiosity of early 20th-century philology. It operates as a profound, unifying mathematical principle governing complex, self-organizing systems. The inverse proportionality between rank and frequency serves as a universal diagnostic signature for networks striving to balance optimal efficiency against structural constraints.

Whether driven by the psychobiological Principle of Least Effort in human language, the stochastic dynamics of preferential attachment in corporate and urban growth, or the metabolic imperatives of neural and genetic networks, the emergence of a Zipfian power law allows a system to establish a highly stable, rapidly accessible core while simultaneously sustaining an infinite, diverse tail. In an era increasingly defined by massive datasets and algorithmic scale—from the tokenization architectures of Large Language Models to the traffic routing of the global internet—Zipf's law remains an indispensable mechanism for understanding, modeling, and optimizing the complex topologies of both natural and artificial worlds.

Monday, 21 September 2026

Left and Right Truncatable Triprimes

What was done with left and right truncatable semiprimes can also be done with triprimes. The very first triprime is 8 = 2 x 2 x 2 and, by adding suitable digits to the LEFT, we get (permalink):

Triprime             | Factorisation
---------------------------------------------
8                    | 2 * 2 * 2
18                   | 2 * 3 * 3
318                  | 2 * 3 * 53
2318                 | 2 * 19 * 61
12318                | 2 * 3 * 2053
112318               | 2 * 89 * 631
6112318              | 2 * 101 * 30259
16112318             | 2 * 53 * 152003
216112318            | 2 * 7687 * 14057
4216112318           | 2 * 11 * 191641469
24216112318          | 2 * 73 * 165863783
124216112318         | 2 * 19 * 3268845061
5124216112318        | 2 * 3203 * 799908853
25124216112318       | 2 * 3 * 4187369352053
225124216112318      | 2 * 431 * 261164983889
2225124216112318     | 2 * 193 * 5764570508063

Next we have 12 = 2 x 2 x 3 which gives (permalink):

Triprime             | Factorisation
---------------------------------------------
12                   | 2 * 2 * 3
212                  | 2 * 2 * 53
5212                 | 2 * 2 * 1303
15212                | 2 * 2 * 3803
315212               | 2 * 2 * 78803
2315212              | 2 * 2 * 578803

The next triprime (18) gives the same chain as did 8. 

Let's try adding digits to the RIGHT this time. Starting with 8 we don't get very far as no digit when adding to the right of 8 will produce a triprime. However, with 12 we have more success (permalink):

Triprime             | Factorisation
---------------------------------------------
12                   | 2 * 2 * 3
124                  | 2 * 2 * 31
1244                 | 2 * 2 * 311
12445                | 5 * 19 * 131
124453               | 7 * 23 * 773
1244534              | 2 * 349 * 1783
12445341             | 3 * 167 * 24841
124453414            | 2 * 23 * 2705509
1244534143           | 19 * 19 * 3447463
12445341431          | 769 * 2053 * 7883
124453414317         | 3 * 23789 * 1743851
1244534143173        | 3 * 31 * 13382087561
12445341431731       | 13 * 887 * 1079294201

The next triprime (18) produces this chain (permalink):

Triprime             | Factorisation
---------------------------------------------
18                   | 2 * 3 * 3
182                  | 2 * 7 * 13
1825                 | 5 * 5 * 73
18255                | 3 * 5 * 1217
182553               | 3 * 7 * 8693
1825534              | 2 * 227 * 4021
18255345             | 3 * 5 * 1217023
182553451            | 31 * 331 * 17791
1825534511           | 17 * 967 * 111049
18255345115          | 5 * 7 * 521581289
182553451151         | 17 * 5147 * 2086349
1825534511511        | 3 * 53 * 11481349129

With a large triprime like 28282 = 2 x 79 x 179 we end up with (permalink):

Triprime             | Factorisation
---------------------------------------------
28282                | 2 * 79 * 179
282821               | 7 * 11 * 3673
2828211              | 3 * 619 * 1523
28282113             | 3 * 3 * 3142457
282821134            | 2 * 5099 * 27733
2828211341           | 17 * 29 * 5736737
28282113411          | 3 * 32621 * 288997
282821134111         | 43 * 563 * 11682479
2828211341111        | 13 * 26591 * 8181517
28282113411116       | 2 * 2 * 7070528352779
282821134111163      | 59 * 1307821 * 3665317
So the program is working well.

Right Truncatable Semiprimes

Having learned from the experience of creating left truncable semiprimes in the previous post, I won't try creating the longest possible chain associated with a given semiprime. Instead, starting with a given semiprime, digits 0 to 9 will be added to the right of the semiprime until a semiprime is found and the process repeated until none of the digits from 0 to 9 can create a semiprime. Let's start with the first semiprime 6 = 2 x 3 (permalink):

Semiprime            | Factorisation
---------------------------------------------
6                    | 2 * 3
62                   | 2 * 31
622                  | 2 * 311
6227                 | 13 * 479
62277                | 3 * 20759
622771               | 23 * 27077
6227711              | 7 * 889673
62277118             | 2 * 31138559
622771187            | 1889 * 329683
6227711873           | 65267 * 95419
62277118733          | 137 * 454577509
622771187339         | 7 * 88967312477
6227711873391        | 3 * 2075903957797
62277118733913       | 3 * 20759039577971

Next we have 10 = 2 x 5 (permalink):

Semiprime            | Factorisation
---------------------------------------------
10                   | 2 * 5
106                  | 2 * 53
1067                 | 11 * 97
10671                | 3 * 3557
106717               | 13 * 8209
1067173              | 19 * 56167
10671731             | 7 * 1524533
106717315            | 5 * 21343463
1067173151           | 11 * 97015741
10671731513          | 653 * 16342621
106717315135         | 5 * 21343463027
1067173151351        | 523 * 2040484037

Next we have 14 = 2 x 7 (permalink).

Semiprime            | Factorisation
---------------------------------------------
14                   | 2 * 7
141                  | 3 * 47
1411                 | 17 * 83
14111                | 103 * 137
141119               | 11 * 12829
1411193              | 7 * 201599
14111933             | 11 * 1282903
141119339            | 83 * 1700233

Next we have 15 = 3 x 5 (permalink).

Semiprime            | Factorisation
---------------------------------------------
15                   | 3 * 5
155                  | 5 * 31
1555                 | 5 * 311
15553                | 103 * 151
155531               | 43 * 3617

Now we'll try 21 = 3 x 7 (permalink).

Semiprime            | Factorisation
---------------------------------------------
21                   | 3 * 7
213                  | 3 * 71
2138                 | 2 * 1069
21381                | 3 * 7127
213811               | 13 * 16447
2138111              | 61 * 35051
21381117             | 3 * 7127039

Let's try a larger number like 28293.

Semiprime            | Factorisation
---------------------------------------------
28293                | 3 * 9431
282937               | 31 * 9127
2829371              | 1571 * 1801
28293711             | 3 * 9431237
282937111            | 15959 * 17729
2829371119           | 331 * 8547949

Clearly the chains are shorter when creating right truncatable semiprimes.

Left Truncatable Semiprimes

Just as with primes, we can have left truncatable and right truncatable semiprimes. The smallest semiprime is 6 = 2 x 3 and using that as our starting point, we can build a chain of left truncatable semiprimes as shown below (permalink):

Semiprime                | Factorisation
---------------------------------------------
6                        | 2 * 3
46                       | 2 * 23
446                      | 2 * 223
2446                     | 2 * 1223
62446                    | 2 * 31223
762446                   | 2 * 381223
6762446                  | 2 * 3381223
86762446                 | 2 * 43381223
986762446                | 2 * 493381223
4986762446               | 2 * 2493381223
34986762446              | 2 * 17493381223
634986762446             | 2 * 317493381223
9634986762446            | 2 * 4817493381223
59634986762446           | 2 * 29817493381223
959634986762446          | 2 * 479817493381223
9959634986762446         | 2 * 4979817493381223
39959634986762446        | 2 * 19979817493381223
439959634986762446       | 2 * 219979817493381223
8439959634986762446      | 2 * 4219979817493381223
48439959634986762446     | 2 * 24219979817493381223
248439959634986762446    | 2 * 124219979817493381223
4248439959634986762446   | 2 * 2124219979817493381223
84248439959634986762446  | 2 * 42124219979817493381223
984248439959634986762446 | 2 * 492124219979817493381223

The next semiprime is 10 = 2 x 5 stops right where it starts and no digits added its left will produce a semiprime. Next we have 14 = 2 x 7 (permalink):

Semiprime            | Factorisation
---------------------------------------------
14                   | 2 * 7
214                  | 2 * 107
7214                 | 2 * 3607
87214                | 2 * 43607
187214               | 2 * 93607
5187214              | 2 * 2593607
35187214             | 2 * 17593607
735187214            | 2 * 367593607
5735187214           | 2 * 2867593607
95735187214          | 2 * 47867593607
495735187214         | 2 * 247867593607
3495735187214        | 2 * 1747867593607
53495735187214       | 2 * 26747867593607
353495735187214      | 2 * 176747867593607
6353495735187214     | 2 * 3176747867593607
16353495735187214    | 2 * 8176747867593607
316353495735187214   | 2 * 158176747867593607

The next semiprime is 15 = 3 x 5 and it produces the following chain (permalink):

Semiprime            | Factorisation
---------------------------------------------
15                   | 3 * 5
415                  | 5 * 83
7415                 | 5 * 1483
27415                | 5 * 5483
927415               | 5 * 185483
7927415              | 5 * 1585483
97927415             | 5 * 19585483
597927415            | 5 * 119585483
6597927415           | 5 * 1319585483
66597927415          | 5 * 13319585483
366597927415         | 5 * 73319585483
3366597927415        | 5 * 673319585483
33366597927415       | 5 * 6673319585483
733366597927415      | 5 * 146673319585483
9733366597927415     | 5 * 1946673319585483
69733366597927415    | 5 * 13946673319585483
869733366597927415   | 5 * 173946673319585483
9869733366597927415  | 5 * 1973946673319585483
49869733366597927415 | 5 * 9973946673319585483


However, when we input 21 = 3 x 7 the program times out. As Gemini says:
The timeout occurs because some starting numbers, like 21, spawn massive branching paths of valid semiprimes. As the numbers grow larger with each prepended digit, the prime factorization calculations become increasingly computationally expensive.

Setting a maximum depth prevents a timeout but we never get to see the end of the chain. With a maximum depth of 10, we get the following chain of semiprimes:

Semiprime            | Factorisation
---------------------------------------------
21                   | 3 * 7
121                  | 11 * 11
1121                 | 19 * 59
81121                | 23 * 3527
181121               | 71 * 2551
2181121              | 853 * 2557
32181121             | 7 * 4597303
932181121            | 139 * 6706339
3932181121           | 11 * 357471011
33932181121          | 87683 * 386987

By contrast, the semiprime 25 leads to a dead end.

33 = 3 x 11 has the same problem as 21. As I said to Gemini:
The problem with the generation of the semiprime chain seems to be ensuring that it is the longest possible chain. Let’s not try to ensure this. Let’s start with a semiprime like 21 and look for the smallest possible digit that, appended to the left, produces a new semiprime. Let’s proceed on that basis until no suitable digit can be found and the chain ends. Can you construct a chain based on that criterion (with no maximum depth specified). Output as before: table and comma-separated list.
The resultant program produced this output for 21 when it was revised (permalink):


Semiprime                 | Factorisation
---------------------------------------------
21                        | 3 * 7
121                       | 11 * 11
1121                      | 19 * 59
81121                     | 23 * 3527
181121                    | 71 * 2551
2181121                   | 853 * 2557
32181121                  | 7 * 4597303
932181121                 | 139 * 6706339
3932181121                | 11 * 357471011
33932181121               | 87683 * 386987
633932181121              | 181 * 3502387741
2633932181121             | 3 * 877977393707
52633932181121            | 17 * 3096113657713
252633932181121           | 976453 * 258726157
3252633932181121          | 36187 * 89884044883
63252633932181121         | 31 * 2040407546199391
363252633932181121        | 3851 * 94326833012771
3363252633932181121       | 757811 * 4438115353211
53363252633932181121      | 3 * 17787750877977393707
153363252633932181121     | 103 * 1488963617805166807
3153363252633932181121    | 809657423 * 3894688250927
73153363252633932181121   | 13 * 5627181788664148629317
373153363252633932181121  | 331537 * 1125525546930309233
2373153363252633932181121 | 35724754739 * 66428821711739

The downside of course is that the longest possible chain is not uncovered. Here is the result for 14 when the program is now run (permalink).

Semiprime            | Factorisation
---------------------------------------------
14                   | 2 * 7
214                  | 2 * 107
1214                 | 2 * 607
21214                | 2 * 10607
121214               | 2 * 60607
Here is the result for 33 (permalink):

Semiprime            | Factorisation
---------------------------------------------
33                   | 3 * 11
133                  | 7 * 19
1133                 | 11 * 103
21133                | 7 * 3019
121133               | 29 * 4177
2121133              | 7 * 303019
22121133             | 3 * 7373711
122121133            | 107 * 1141319
9122121133           | 4363 * 2090791
39122121133          | 19 * 2059059007
139122121133         | 2801 * 49668733
4139122121133        | 3 * 1379707373711
44139122121133       | 13 * 3395317086241
144139122121133      | 683 * 211038246151
8144139122121133     | 60510661 * 134590153
18144139122121133    | 11 * 1649467192920103

The program works quite well for larger semiprimes too. Take 28293 as an example (permalink):

Semiprime            | Factorisation
---------------------------------------------
28293                | 3 * 9431
428293               | 53 * 8081
1428293              | 131 * 10903
11428293             | 3 * 3809431
211428293            | 9419 * 22447
2211428293           | 6073 * 364141
12211428293          | 4073 * 2998141
312211428293         | 7433 * 42003421
2312211428293        | 13 * 177862417561
32312211428293       | 4967 * 6505377779
332312211428293      | 3659 * 90820500527
4332312211428293     | 18301 * 236725436393
84332312211428293    | 41 * 2056885663693373
284332312211428293   | 3 * 94777437403809431
2284332312211428293  | 17 * 134372488953613429

I'll investigate the generation of right truncatable semiprimes in a future post.

Sunday, 20 September 2026

Truncatable Primes Revisited

The following information is true:

The largest left-truncatable prime in base 10 is the 24-digit number:$$357,686,312,646,216,567,629,137$$A left-truncatable prime is a prime number that contains no zeros and remains prime every time you successively strip away its leading (leftmost) digit. 

However, the same information presented visually where it has a lot more impact.

The largest right truncatable number (73939133) is far shorter because there is the constraint that the right-most digit can only be 1, 3, 7 or 9. A similar inverted pyramid will look like this. Note that 7 is the final prime left as was the case with the right truncatable record holder.

73939133
7393913
739391
73939
7393
739
73
7

If we start with the digit 3, the only other possible choice, and build the longest possible chain of left truncatable primes we end up with the following 20 primes (compared to 24 when we started with the digit 7 - permalink):

3
83
883
6883
76883
676883
6676883
36676883
536676883
3536676883
13536676883
213536676883
7213536676883
57213536676883
957213536676883
4957213536676883
84957213536676883
484957213536676883
6484957213536676883
36484957213536676883

Creating a chain of right-truncatable primes gives us eight primes just as it did when starting with the digit 7 (permalink):

3
37
373
3733
37337
373379
3733799
37337999

We could also start with 2 and in that case we get the following right-truncatable primes:

2
29
293
2939
29399
293999
2939999
29399999

Thursday, 17 September 2026

Supercharged Semiprimes

 There is a set of non-square semiprimes defined by two criteria:

  • the two prime factors concatenate in either order to form two new semiprimes
  • the digits of the two prime factors can each be rearranged to form semiprimes

28291 is an example of such a semiprime. Let's examine its properties where || represents concatenation:$$ \begin{align} 28291 &=19 \times 1489\\ 19 \, || \, 1489 &= 191489 \\ &= 53 \times 3613 \\ 1489 \, || \,19  &=148919 \\ &= 137 \times 1087 \\ 19 &\rightarrow 91 \\&=7 \times 13 \\1489 &\rightarrow 1894 \\ &= 2 \times 947 \end{align}$$Up to 40000, the semiprimes that meet both criteria are (permalink):

779, 817, 1121, 1763, 1957, 2071, 2869, 3173, 3403, 3629, 4579, 4687, 4897, 5149, 5977, 6973, 7009, 7181, 7261, 7367, 7493, 8077, 8341, 8413, 8549, 8851, 8977, 9071, 9937, 10123, 10363, 10393, 10679, 10697, 10951, 11051, 11419, 11647, 12407, 12599, 13207, 14317, 14473, 14719, 14809, 14953, 15007, 15143, 15529, 15637, 15751, 16283, 16297, 16321, 16351, 16789, 16873, 17671, 18391, 18563, 18643, 19177, 19247, 19451, 20081, 20311, 20653, 20729, 20989, 21071, 21223, 21733, 21829, 21887, 21971, 22313, 22361, 22489, 22819, 22837, 22879, 22987, 23083, 23351, 23521, 24257, 24377, 24559, 24751, 24757, 24823, 25061, 25843, 25901, 26179, 26239, 26617, 26671, 26969, 27089, 27161, 27199, 27331, 27383, 27589, 27913, 28177, 28291, 28801, 28907, 28937, 28999, 29149, 29329, 29621, 30301, 30571, 30847, 31111, 31921, 32101, 32239, 32293, 32387, 32651, 32699, 33307, 33907, 33991, 34093, 34571, 34579, 34633, 34873, 34927, 35137, 35209, 35341, 35389, 35587, 35701, 35881, 36031, 36199, 36689, 37069, 37127, 37867, 37901, 38021, 38141, 38173, 38323, 38477, 38497, 38989, 39187, 39433, 39707, 39757

Tuesday, 15 September 2026

Fermat Numbers

A Fermat number, named after Pierre de Fermat (1601–1665), the first known to have studied them, is a positive integer of the form: $$ \text{F}_n=2^{2^n}+1 $$ where n is a non-negative integer. The first few Fermat numbers are:
  • \(\text{F}_0=3\)
  • \(\text{F}_1=5\)
  • \(\text{F}_2=17 \)
  • \(\text{F}_3=257\)
  • \(\text{F}_4=65537\)
  • \(\text{F}_5=4294967297\)
  • \(\text{F}_6=18446744073709551617\)
  • \(\text{F}_7=340282366920938463463374607431768211457\)
The numbers form the initial members of sequence A000215 in the OEIS. The only known Fermat primes are the first five members of this sequence (3, 5, 17, 257 and 65537).

The number associated with my diurnal age today, \( \textbf{28289}\), is a prime and oddly it has a connection to these Fermat numbers via its membership in OEIS A229856:


   A229856: primes of the form \(384 \times k + 257\) where \(k \geq 0\)


The initial members are:

257, 641, 1409, 3329, 4481, 7937, 9473, 9857, 11393, 11777, 12161, 13313, 13697, 14081, 15233, 16001, 17921, 19073, 19457, 19841, 21377, 23297, 25601, 28289, 30593, 30977, 35201, 35969, 36353, 37889, 38273, 39041

It's stated in the comments to this OEIS sequence that:
Every Fermat number greater than 257 has a prime factor of the form \(384 \times k + 257, k > 0\).

Let's test this out with the initial Fermat numbers greater than 257. Now \( \text{F}_4=65537\) is a prime and so it is its own prime factor and we find that:$$65537 = 384 \times 170 + 257$$The next Fermat numbers listed above are all composite so we need to check their prime factors:$$ \begin{align} \text{F}_5=4294967297 &= 641 \times 6700417 \\ 641 &= 384 \times 1 + 257 \end{align}$$ $$ \begin{align} \text{F}_6=18446744073709,551,617 &=274177 × 67280421310721\\ 67280421310721 &= 384 \times 175209430496+257 \end{align}$$I won't attempt \( \text{F}_7 \) as it's too lengthy but the point is made. There's an explanation that Gemini provided as to why at least one prime factor of a Fermat number must have this form. You can check that out here.