Tuesday, 12 May 2026

Heegner Numbers

My diurnal age today is \( \textbf{28163} \), a prime number, as is \( \textbf{163} \), the number formed by its last three digits. The latter number is quite famous in higher mathematics but I always forget why so I got Gemini to remind me.

The special quality of 163 that places it firmly in the realm of higher mathematics is that it is the largest of the nine Heegner numbers.

In algebraic number theory, a Heegner number is a square-free positive integer $d$ such that the imaginary quadratic field $\mathbb{Q}(\sqrt{-d})$ has class number $1$. Equivalently, this means the ring of integers of this field exhibits unique factorization. The complete set of Heegner numbers (cataloged as OEIS sequence A003173) is $1, 2, 3, 7, 11, 19, 43, 67$, and $163$.

The fact that $163$ ends this sequence leads to two profound and famous mathematical consequences: Ramanujan's constant and the deep structure behind Euler's prime-generating polynomial.

Ramanujan's Constant and Almost-Integers

Because 163 is the largest Heegner number, it produces an astonishing "almost-integer" when placed in the exponential function $e^{\pi \sqrt{d}}$. Specifically:

$$e^{\pi \sqrt{163}} \approx 262537412640768743.99999999999925007...$$

This is widely known as Ramanujan's constant. The reason this number is so staggeringly close to an integer is not a coincidence, but a direct result of the properties of the modular $j$-function.

For any Heegner number $d$, the $j$-invariant of the associated elliptic curve is an exact integer. For $d=163$, the $j$-invariant is exactly $-(640320)^3$.

The Fourier series expansion of the $j$-function in terms of $q = e^{2\pi i \tau}$ is:

$$j(\tau) = \frac{1}{q} + 744 + 196884q + 21493760q^2 + \dots$$

When we evaluate this at $\tau = \frac{1 + \sqrt{-163}}{2}$, $q$ becomes $-e^{-\pi \sqrt{163}}$. Because $163$ is very large, the higher-order terms ($196884q$, etc.) become infinitesimally small. By equating the exact integer $j$-invariant with the first two terms of the expansion, we get:

$$-(640320)^3 \approx -e^{\pi \sqrt{163}} + 744$$

Rearranging this yields:

$$e^{\pi \sqrt{163}} \approx (640320)^3 + 744 = 262537412640768744$$

Euler's Prime-Generating Polynomial

In 1772, Leonhard Euler published the famous quadratic polynomial $n^2 + n + 41$, which yields prime numbers for every integer $n$ from $0$ to $39$.

The remarkable prime-generating efficiency of this polynomial is directly tied to the field $\mathbb{Q}(\sqrt{-163})$. The discriminant of the polynomial $x^2 + x + 41$ is $1^2 - 4(1)(41) = -163$.

Rabinowitsch's theorem states that for $d \equiv 3 \pmod 4$, the polynomial $n^2 + n + \frac{d+1}{4}$ will output primes for all integers $n = 0, 1, \dots, \frac{d-3}{4}$ if and only if $d$ is a Heegner number. Because $163$ is the largest Heegner number, $\frac{163+1}{4} = 41$, making Euler's polynomial the absolute optimal case for this specific phenomenon. There is no other polynomial of this form that will generate a longer string of consecutive primes.


Photo of Kurt Heegner, this photo was taken at the
terrace of his mother's home in Berlin in the 1930s

I only partially understand the mathematics involved. The story behind Heegner, after whom the numbers are named, is as follows: 

The name attached to these numbers belongs to Kurt Heegner (1893–1965), and his story is one of the most famous and somewhat tragic examples of an "outsider" solving a major mathematical problem but dying before receiving recognition.

Here is the history of the man and why the numbers bear his name:

A Private Scholar, Not an Academic

Kurt Heegner was a German mathematician, physicist, and radio engineer. He was born and lived in Berlin for most of his life. Unlike the vast majority of names attached to profound mathematical discoveries, Heegner was not a professional academic. He held no university chair and spent much of his career working in radio engineering and patenting electronic circuits. Mathematics was a pursuit he undertook independently as a private scholar.

Gauss's Class Number Problem

The origin of the Heegner numbers dates back to 1801, when Carl Friedrich Gauss published his foundational text Disquisitiones Arithmeticae. Gauss conjectured that there were exactly nine imaginary quadratic fields with class number 1 (which correspond to the nine numbers $1, 2, 3, 7, 11, 19, 43, 67$, and $163$). For a century and a half, proving that there was no tenth number remained one of the outstanding unsolved problems in number theory.

The 1952 Proof and Rejection

In 1952, Heegner published a paper in a reputable mathematical journal claiming to have finally proven Gauss's conjecture. Heegner's approach was highly unorthodox for the time; he used complex modular functions (specifically building on the earlier work of Heinrich Weber) and Diophantine equations.

Unfortunately, the mathematical establishment completely dismissed his work. Reviewers found his paper dense, unconventional, and difficult to follow. It was widely concluded that his proof contained a fatal gap and was incomplete. Because Heegner was an unknown amateur without academic credentials to vouch for him, the mathematical community effectively ignored his publication, and the problem was still considered unsolved. Heegner died in 1965 without ever seeing his work accepted.

Posthumous Vindication

The story changed dramatically in 1966 and 1967. Two mathematicians, Alan Baker and Harold Stark, independently published universally accepted proofs of Gauss's conjecture using entirely different methods. Stark's proof, in particular, was celebrated as a major breakthrough.

However, in 1968, the British mathematician Bryan Birch (of the Birch and Swinnerton-Dyer conjecture) and Harold Stark himself decided to look back at Heegner's dismissed 1952 paper. Upon careful re-examination, they realized that Heegner’s proof was actually completely correct.

The supposed "gap" in Heegner's logic was not a flaw; he had simply omitted the details of a specific theorem from Weber's work, assuming the reader would know it. Once that theorem was explicitly applied, Heegner's proof was airtight. Stark and Birch brought this to the attention of the mathematical community, establishing that Heegner had successfully solved the problem 15 years before anyone else.

Legacy

To honor his undisputed priority and to rectify the community's failure to recognize a brilliant piece of mathematics during his lifetime, the nine numbers of Gauss's conjecture were formally named Heegner numbers. Furthermore, the points he used on elliptic curves to construct his proof are now known in modern arithmetic geometry as Heegner points, which remain a highly active and critical area of research in number theory today.

Saturday, 9 May 2026

Horadam Sequences

A Horadam sequence is a generalization of the Fibonacci numbers defined by the four constants (\(p,q,r,s\)) and the definitions \(H_0=p\) and \(H_1=q\) together with the linear recurrence equation for \(n>1\):$$H_n=sH_{n-1}+rH_{n-2}$$Specific values of \(r\) and \(s\) lead to well known sequences:

  • Fibonacci Numbers: \(F_n=F_{n-1}+F_{n-2}\\ \text{ where }n \geq 2, F_0=0, F_1=1\)
     
  • Lucus Number: \(L_n=L_{n-1}+L_{n-2} \\ \text{ where } n \geq 2, L_0=2, L_1=1\)

  • Pell Numbers: \(P_n=2P_{n-1}+P_{n-2} \\ \text{ where } n \geq 2, P_0=0, P_1=1\)

  • Pell-Lucus Numbers: \(Q_n=2Q_{n-1}+Q_{n-2} \\ \text{ where } n \geq 2, Q_0=Q_1=1\)

  • Jacobsthal Numbers: \(J_n=J_{n-1}+2J_{n-2} \\ \text{ where } n \geq 2, J_0=0, J_1=1 \)

  • Jacobsthal-Lucas Numbers: \( j_n=j_{n-1}+2j_{n-2} \\ \text{ where } n \geq 2, j_0=j_1=2\)

Today I turned 28160 days old and this number is a member of OEIS A085449:


 A085449: Horadam sequence (0,1,4,2)

The numbers indicate that the sequence is generated as follows for \(n>1\):$$H_n=2H_{n-1}+4H_{n-2}$$with \(H_0=0\), \(H_1=1\), \(r=4\) and \(s=2\)

The sequence begins: 0, 1, 2, 8, 24, 80, 256, 832, 2688, 8704, 28160

The generating function is:$$ \frac{x}{1-2x-4x^2}$$The progressive ratios between successive terms approach the following number:$$ \frac{H_n}{H_{n-1}} \rightarrow 2\phi = \sqrt{5}+ 1 \text{ as }n \text{ gets larger}$$In the general case we have:$$ \frac{H_n}{H_{n-1}} \rightarrow \frac{r}{s} \phi = \frac{r}{s} (\sqrt{5}+ 1) \text{ as }n \text{ gets larger}$$Oddly, the name Horadam does not appear in the MacTutor biographies of mathematicians but Gemini provided the following summary of his life and work:

Alwyn Francis ("Horrie") Horadam (1923–2016)

Alwyn Francis ("Horrie") Horadam was a prominent Australian mathematician best known for his extensive work in number theory and for generalizing second-order linear recurrences.

Here is a comprehensive overview of his life, career, and the mathematical sequences that bear his name.


Early Life and Education

Horadam was born on March 22, 1923, to a family of dairy farmers in the rural settlement of Scotts Flat in the Hunter Valley of New South Wales, Australia. His dedication to education was evident early on; during the Great Depression, he traveled 110 kilometers round-trip by train every day just to attend high school in Maitland, all while managing farm duties before and after his commute.

He went on to graduate with First Class Honours in Mathematics from the University of Sydney in 1944. He later earned a BEd from the University of Melbourne and a PhD from the University of Sydney, focusing his early doctoral research on Clifford geometry in complex projective spaces.

Academic Career at UNE

Horadam spent nearly his entire 40-year academic career at the University of New England (UNE) in Armidale, New South Wales. Starting as a lecturer in 1947, he eventually progressed to Professor of Mathematics and served as the Dean of the Faculty of Science.

Beyond his research, he was widely regarded as a deeply committed and generous educator. He served on the New South Wales Junior School Mathematics Committee for 25 continuous years, co-authored several high school mathematics textbooks, and maintained an open-door policy for his university students throughout his tenure.

The Horadam Sequence

While Horadam's early interests included geometry and algebra, his most lasting mathematical legacy lies in number theory—specifically, his generalization of integer sequences. Introduced in a series of papers in the 1960s, the Horadam sequence, commonly denoted as Wn(a, b; p, q), provides a unified framework for second-order linear recurrences.

The sequence is defined by two initial conditions:

W0 = a
W1 = b

And the recurrence relation for n ≥ 2:

Wn = pWn-1 - qWn-2

(Note: Depending on the specific convention used in various literature, the recurrence is sometimes written as Wn = pWn-1 + qWn-2.)

By altering the four parameters (a, b, p, q), the Horadam sequence acts as a parent to many famous recursive sequences:

  • Fibonacci Numbers: Generated by setting a=0, b=1, p=1, and q=-1.
  • Lucas Numbers: Generated by setting a=2, b=1, p=1, and q=-1.
  • Pell Numbers: Generated by setting a=0, b=1, p=2, and q=-1.

This generalization allowed mathematicians to prove broad identities and Binet-style formulas that apply universally to all these sequences at once, rather than analyzing them in isolation.

Legacy in Sequence Analysis

Horadam's generalizations paved the way for modern, systematic analysis of recurrence relations. He was a foundation and sustaining member of the Fibonacci Association and served extensively on the editorial board of the Fibonacci Quarterly. Over his lifetime, he published widely on combinatorial structures, generating functions, and sequence periodicities.

He continued his research well into his retirement, publishing his final papers in 2006. Horadam passed away in Armidale in 2016 at the age of 93, leaving behind a profound legacy in both Australian mathematical education and global number theory.

Interestingly his wife was a fellow mathematician and clearly an impressive woman:

Eleanor Mollie Horadam (née Spedding) (1921–2002)

Eleanor Mollie Horadam was a highly accomplished mathematician in her own right, with a fascinating career and a lasting legacy in Australian academia. She was the wife of Alwyn Francis Horadam.


Early Life and World War II

Born on June 29, 1921, in Yorkshire, England, to a suffragette mother and a pharmacist father, Mollie demonstrated early academic brilliance. She studied the Mathematical Tripos at Girton College, Cambridge, earning her BA in 1942. However, because Cambridge did not allow women to receive degrees at public graduation ceremonies at the time, she was not publicly conferred her degree until she returned on a sabbatical in 1956.

During World War II, she worked in the Stress Group at Rolls-Royce, performing stress-strain analyses on jet engines. While working by day, she took night classes in engineering at the University of London, ultimately earning a First Class Honours degree. During this time, she even outpaced early computing; when told it would take weeks to run a stress problem on the newly constructed Mark 1 computer in Manchester, she manually proved the exact mathematical solution much faster.

Move to Australia and Academic Career

Dissatisfied with post-war England's lack of opportunities and preference for promoting less-qualified men, Mollie emigrated alone to Australia in 1949 to take up a lectureship in mathematics and physics at the New England University College (which later became the University of New England, or UNE). It was here that she met fellow mathematics lecturer Alwyn Horadam, whom she married in 1950.

Mollie became a trailblazer for women in Australian academia. She successfully lobbied UNE to update its maternity policies, which allowed her to retain her lecturing position while raising their three daughters—a highly unusual achievement for the era. One of their daughters, Kathy Horadam, also went on to become a prominent Australian mathematician and Emeritus Professor at RMIT.

Mathematical Contributions

Inspired by lectures from J.E. Littlewood during her 1956 sabbatical at Cambridge, Mollie shifted her focus to number theory at the age of 35. Over the next decade, she published more than 30 research papers, primarily focusing on the number theory of generalised integers and generalised prime numbers. This extensive body of research earned her a PhD by Prior Publication from UNE in 1965, leading to her promotion to Senior Lecturer. She also authored the textbook Principles of Mathematics for Economists.

In 1970, she broke another barrier by becoming the first female Sub-Dean of a faculty (Science) at UNE. Following her academic retirement in 1982, she established a successful commercial business dealing in antique silver. She was admitted as a Fellow of the University of New England in 1995. Mollie passed away in Armidale in 2002 at the age of 80, remembered as a pioneering intellect, a community leader, and a resilient force in a predominantly male profession.

Their eldest daughter followed in her parents' footsteps:

Alwyn and Mollie Horadam had three daughters: Kathryn (Kathy), Kerry, and Alanna. They also had a total of five granddaughters and one grandson.

The most publicly known of their children is their daughter Kathryn Jennifer Horadam (born in 1951 in Armidale), who followed in her parents' footsteps to become a highly accomplished and internationally recognized mathematician.


Kathryn Horadam's Career and Contributions

  • Education: She studied mathematics at the Australian National University, earning her bachelor's degree in 1972 and completing her PhD in 1977 with a dissertation titled The Homology of Groupnets.
  • Academic Career: She built a long and distinguished career at the Royal Melbourne Institute of Technology (RMIT), where she worked for over 30 years. She became a full professor of mathematics there in 1995 and currently holds the title of Emeritus Professor.
  • Research Focus: She is best known for her specialized research on Hadamard matrices and their applications in information security (keeping digital data safe). Outside of academia, she applied this expertise by working for three years with Australia's Defence Science and Technology Group.
  • Publications: She authored the comprehensive text Hadamard Matrices and Their Applications, published by Princeton University Press in 2007.
  • Recognition: Her impact on mathematics has been widely celebrated. She became a fellow of the Institute of Combinatorics and its Applications in 1991 and a fellow of the Australian Mathematical Society in 2001. In 2011, RMIT hosted a special international workshop on Hadamard matrices specifically in honor of her 60th birthday, with the resulting papers published in a special 2013 issue of the Australasian Journal of Combinatorics.

While Kathy pursued a high-profile academic career in mathematics like her parents, public details regarding the specific careers and lives of Kerry and Alanna are not prominently featured in public or academic records.

Friday, 8 May 2026

Zeroless Tetranacci Numbers

In a post titled, Sequences Formed By Removing Zerosfrom January 2023,  I wrote that "It's interesting to consider what happens to a sequence if a certain rule is applied but with the stipulation that any zeros arising must be removed". In that post I looked at the zeroless Fibonacci sequence that falls into a repeating loop with a confirmed period of 912. 

The zeroless Tribonacci sequence falls into a much larger repeating loop with a confirmed period of 300,056,874. It reaches this cycle at index 208,666,297. However, it is not known whether the zeroless Tetranacci sequences cycles or not but, if it does, then \(s+p > 10^{10}\) where \(s\) and \(p\) are the starting index and period of the cycle, respectively.

 
 A371916: zeroless analog of tetranacci numbers.

The initial members are:

1, 1, 1, 1, 4, 7, 13, 25, 49, 94, 181, 349, 673, 1297, 25, 2344, 4339, 85, 6793, 13561, 24778, 45217, 9349, 9295, 88639, 1525, 1888, 11347, 13399, 28159, 54793, 17698, 11449, 11299, 95239, 135685, 253672, 495895, 98491, 983743, 183181, 176131, 1441546, 278461, 279319, 2175457

Figure 1 shows a plot of the first 100 terms:


Figure 1: permalink

Like the zeroless Fibonacci and Tribonacci sequences the ratio between successive terms of the zeroless Tetranacci sequence never approaches a limit. With no suppression of zeros, the following are the convergences:

  • Fibonacci: $\phi = \frac{1+\sqrt{5}}{2} \text{ which is }\approx 1.61803$
  • Tribonacci: the real root of $x^3 - x^2 - x - 1 = 0 \text{ which is } \approx 1.83929$
  • Tetranacci: the real root of $x^4 - x^3 - x^2 - x - 1 = 0 \text{ which is }\approx 1.92756$

Wednesday, 6 May 2026

Pandigital Products

Yesterday I turned 28156 days old and this number has an interesting property:$$28156 = 4 \times 7039$$The factorisation shown is not the prime factorisation but, looking at both sides of the equation, it can be seen that each of the digits from 0 to 9 occurs exactly once. This makes the number a member of OEIS A370970:


A370970
: numbers \(k\) which have a factorization \(k = f_1 \times f_2 \times \ldots \times f_n \) where the digits of \({k, f_1, f_2, \ldots, f_n}\) together give \(0,1, \ldots ,9\) exactly once.

Here is the complete list of terms:

8596 = 2 x 14 x 307

8790 = 2 x 3 x 1465

9360 = 2 x 4 x 15 x 78

9380 = 2 x 5 x 14 x 67

9870 = 2 x 3 x 1645

10752 = 3 x 4 x 896

12780 = 4 x 5 x 639

14760 = 5 x 9 x 328

14820 = 5 x 39 x 76

15628 = 4 x 3907

15678 = 39 x 402

16038 = 27 x 594 = 54 x 297

16704 = 9 x 32 x 58

17082 = 3 x 5694

17820 = 36 x 495 = 45 x 396

17920 = 8 x 35 x 64

18720 = 4 x 5 x 936

19084 = 52 x 367

19240 = 8 x 37 x 65

20457 = 3 x 6819

20574 = 6 x 9 x 381

20754 = 3 x 6918

21658 = 7 x 3094

24056 = 8 x 31 x 97

24507 = 3 x 8169

25803 = 9 x 47 x 61

26180 = 4 x 7 x 935

26910 = 78 x 345

27504 = 3 x 9168

28156 = 4 x 7039

28651 = 7 x 4093

30296 = 7 x 8 x 541

30576 = 8 x 42 x 91

30752 = 4 x 8 x 961

31920 = 5 x 76 x 84

32760 = 8 x 45 x 91

32890 = 46 x 715

34902 = 6 x 5817

36508 = 4 x 9127

47320 = 8 x 65 x 91

58401 = 63 x 927

65128 = 7 x 9304 

65821 = 7 x 9403

These numbers are few and far between as can be seen and 28156 in particular recurs with permuted digits as 15628, 21658, 28651, 65128 and 65821.

Friday, 1 May 2026

Cartesian Product versus Self-Convolution

I asked Gemini the following:

How does the self convolution of a set A differ from the Cartesian product of the set with itself (A x A)?

This was the response: 

To understand the difference between the Cartesian product of a set and its self-convolution, we have to look at what mathematical object each operation produces. In short: the Cartesian product generates a new set of raw pairs, while the convolution generates a sequence that counts the frequencies of their sums.

Here is a full breakdown of how these two concepts differ and how they ultimately connect.

1. The Cartesian Product: Structural Pairing

The Cartesian product of a set $A$ with itself, denoted as $A \times A$, is an operation strictly within set theory.

It takes the elements of $A$ and creates a new set containing every possible ordered pair $(x, y)$, where both $x$ and $y$ are elements of $A$.

$$A \times A = \{(x, y) \mid x \in A \text{ and } y \in A\}$$

    • Nature: It is purely structural. It does not add, multiply, or combine the values of the elements; it merely groups them side-by-side in a 2D grid.
    • Size: If set $A$ contains $k$ elements, the Cartesian product $A \times A$ will always contain exactly $k^2$ elements.

2. The Self-Convolution: Frequency of Sums

Strictly speaking, you cannot convolve a "set" directly; convolution is an operation applied to functions or sequences. When mathematicians refer to the convolution of a set $A$, they are actually referring to the discrete convolution of the set's indicator sequence (also called the characteristic function).

Let $1_A(x)$ be a sequence where the value is $1$ if $x$ is in set $A$, and $0$ if it is not. The self-convolution of this sequence produces a new sequence, $c_n$:

$$c_n = \sum_{i+j=n} 1_A(i) \cdot 1_A(j)$$

    • Nature: It is an arithmetic and combinatorial operation. The resulting sequence $c_n$ tells you exactly how many times the integer $n$ can be expressed as the sum of two elements from set $A$.
    • Size: The result is not a finite set of pairs, but an infinite sequence of integers (though it will be mostly zeros if $A$ is a finite set).

3. The Core Difference

The Cartesian product asks: "What are all the possible ways to pick two elements from this set?"

The Convolution asks: "If I add those two elements together, how many pairs produce a sum of $n$?"

If you imagine the Cartesian product as a square grid of pairs, the convolution is the result of drawing diagonal lines through that grid (where $x + y = n$) and counting how many pairs fall on each diagonal.

4. A Concrete Example

Let’s define a set of integers: $A = \{1, 2, 4\}$

The Cartesian Product ($A \times A$) creates a set of $3^2 = 9$ ordered pairs:

$A \times A = \{(1,1), (1,2), (1,4), (2,1), (2,2), (2,4), (4,1), (4,2), (4,4)\}$

The Self-Convolution maps the sums of these pairs to their frequencies. Let's add the elements of each pair together:

    • Sums to 2: $(1,1) \rightarrow$ 1 pair
    • Sums to 3: $(1,2), (2,1) \rightarrow$ 2 pairs
    • Sums to 4: $(2,2) \rightarrow$ 1 pair
    • Sums to 5: $(1,4), (4,1) \rightarrow$ 2 pairs
    • Sums to 6: $(2,4), (4,2) \rightarrow$ 2 pairs
    • Sums to 7: None $\rightarrow$ 0 pairs
    • Sums to 8: $(4,4) \rightarrow$ 1 pair

The resulting convolution sequence $c_n$ (starting from index $n=0$) would look like this:

$0, 0, 1, 2, 1, 2, 2, 0, 1, 0, 0, 0...$

5. The Generating Function Connection

Because you are working with tools like SageMath, the most elegant way to see the relationship between these two concepts is through generating functions.

If you turn set $A$ into a polynomial where the elements of the set are the exponents, you get:

$$f(x) = x^1 + x^2 + x^4$$

When you square this polynomial (which is the algebraic equivalent of the Cartesian product), you get:

$$f(x)^2 = (x^1 + x^2 + x^4) \cdot (x^1 + x^2 + x^4)$$

$$f(x)^2 = x^2 + 2x^3 + x^4 + 2x^5 + 2x^6 + x^8$$

Look at the coefficients of the expanded polynomial: $1, 2, 1, 2, 2, 1$. These are the exact non-zero values of our convolution sequence. The Cartesian product dictates the terms being multiplied, but the mathematical simplification of gathering like-terms is the act of convolution.

Convolutions Revisited

On the 12th October 2025, I created a post titled A Practical Example of a Convolution which began as follows:

Over the past decade, for some reason, I've chosen to ignore convolutions. Whenever they were mentioned in an OEIS sequence, I simply skipped over the reference. However, I'm now attempting to redress that neglect and to that end I was lucky to find two excellent YouTube videos about convolutions made by 3Blue1Brown (this guy has 7.76 million subscribers and for good reason).

I finished the post by saying:

This post is simply the first in what I hope will be a series of posts relating to convolutions. As I've already discovered, convolutions linked to Fourier transforms and Laplace transformations so it's a big topic to investigate but at least I've finally made a start.

Unfortunately there was no future series of posts relating to convolutions but I was reminded of them once again thanks to the number associated with my diurnal age today: \( \textbf{28152}\). It is a member of OEIS A014342:


 A014342: Convolution of primes with themselves.

 The initial members are:

4, 12, 29, 58, 111, 188, 305, 462, 679, 968, 1337, 1806, 2391, 3104, 3953, 4978, 6175, 7568, 9185, 11030, 13143, 15516, 18177, 21150, 24471, \( \textbf{28152}\), 32197, 36678, 41543, 46828, 52621, 58874, 65659, 73000, 80949, 89462, 98631, 108396, 118869, 130102, 142071

This time around I got Gemini to explain how the convolution was calculated:

In the context of integer sequences like those found in the OEIS, a convolution (specifically, a discrete Cauchy convolution) is a mathematical way of combining two sequences to create a third. When a sequence is convolved with itself, you are multiplying its terms together in a symmetrical, sliding window and summing the results.

Here is the full breakdown of how this works for OEIS A014342.

The Formula

First, let's establish our base sequence, which is the sequence of prime numbers, denoted as pn:

    • p1 = 2
    • p2 = 3
    • p3 = 5
    • p4 = 7
    • p5 = 11
    • ...and so on.

The n-th term of the convolved sequence, let's call it cn, is calculated by taking the sum of the products of two primes whose indices add up to n + 1.

The formal equation looks like this:

cn = Σ (pi × pn-i+1)

(summed from i = 1 to n)

In simpler terms: to find the n-th number in your sequence, you line up the first n primes going forward, line up the exact same n primes going backward, multiply the overlapping pairs, and add those products together.

Step-by-Step Calculation

Here is how the first few members of the sequence are calculated using this method.

1st Term (n = 1):

We only use the first prime (p1 = 2).

c1 = (p1 × p1)

c1 = (2 × 2)

c1 = 4

2nd Term (n = 2):

We use the first two primes (2 and 3). We pair the first with the second, and the second with the first.

c2 = (p1 × p2) + (p2 × p1)

c2 = (2 × 3) + (3 × 2)

c2 = 6 + 6

c2 = 12

3rd Term (n = 3):

We use the first three primes (2, 3, and 5). Notice how the indices always add up to 4 (n + 1).

c3 = (p1 × p3) + (p2 × p2) + (p3 × p1)

c3 = (2 × 5) + (3 × 3) + (5 × 2)

c3 = 10 + 9 + 10

c3 = 29

4th Term (n = 4):

We use the first four primes (2, 3, 5, and 7).

c4 = (p1 × p4) + (p2 × p3) + (p3 × p2) + (p4 × p1)

c4 = (2 × 7) + (3 × 5) + (5 × 3) + (7 × 2)

c4 = 14 + 15 + 15 + 14

c4 = 58

5th Term (n = 5):

We use the first five primes (2, 3, 5, 7, and 11).

c5 = (p1 × p5) + (p2 × p4) + (p3 × p3) + (p4 × p2) + (p5 × p1)

c5 = (2 × 11) + (3 × 7) + (5 × 5) + (7 × 3) + (11 × 2)

c5 = 22 + 21 + 25 + 21 + 22

c5 = 111

The Pattern

As you calculate further into the sequence, this symmetrical "folding" action continues. You are always starting at the outer edges of your chosen set of primes and working your way inward to the middle, multiplying the pairs and summing them up. This specific operation is incredibly common in polynomials, probability theory, and signal processing, but when applied purely to integer sequences like the primes, it yields the exact sequence you provided.

Remember that SageMath makes it very easy to determine self-convolutions due to its formula convolutions(A, A) where A is any given set.

Thursday, 30 April 2026

Unprimeable Versus Weakly Prime Numbers

Let's clarify the distinction between these two types of numbers:

Unprimeable numbers are composite numbers that remain composite regardless of which single digit is changed to another. These numbers are essentially "immune" to becoming prime through a single-digit modification in base 10, with 200 being the smallest example. 

Key Facts about Unprimeable Numbers:

  • Definition: A composite number is unprimeable if changing one digit to any other digit (0-9) never produces a prime number. 
  • Smallest Examples: The sequence begins 200, 204, 206, 208, 320, 322, 324, 325, 326, 328, .... 
  • Example Case (200): Modifying the first, second, or third digit of 200 always results in a composite number (e.g., changing 200 to 100, 300, 210, 201, etc.). 
  • Differentiation: They are sometimes confused with "weakly primes", which are actual prime numbers that cannot be turned into a different prime by changing a single digit.

The reason that I sought the clarification is that the number associated with my diurnal age today, 28151, has a property that allows it membership of OEIS A186995:


  A186995: smallest weak prime in base \(n\).

The initial members of this sequence, up to base 16, are:

127, 2, 373, 83, 28151, 223, 6211, 2789, 294001, 3347, 20837899, 4751, 6588721, 484439, 862789

28151 corresponds to base 6 where it has the representation 334155. This large value surprised me and so I asked Gemini:

OEIS A186995 lists the smallest weak prime in base n and it begins with 127, 2, 373, 83, 28151, 223, 6211, 2789, 294001, 3347, 20837899, 4751, 6588721, 484439, 862789 etc. starting with n=2. When we get to n=6, the base 6 equivalent of 28151 is 334155 but I find it hard to believe that in the first 28150 base 6 numbers there are none that are weakly prime. Can you explain how this is so in the case of base 6.

This was the response: 

The reason the smallest weakly prime number in base 6 jumps so drastically to 28151 (which is 334155 in base 6) lies in the prime factorization of the base itself. Because 6 is the product of the two smallest prime numbers, 2 and 3, it creates a mathematical "divisibility shield" that makes it statistically extremely difficult for a base 6 number to qualify as weakly prime.

Here is the step-by-step mechanics of how this works:

The Mechanics of Digit Substitution

In base 6, a number N is constructed from its digits as:

N = d6k + dk-1 6k-1 + … + d61 + d60

For a number to be weakly prime, it must first be prime. If N is prime (and greater than 3), it cannot be divisible by 2 or 3. This means it must be an odd number, and it cannot be a multiple of 3.

When you modify a digit di to a new value c (where c is between 0 and 5), the difference between the new number and the original prime N is exactly (c − di) 6i.

The Divisibility Shield

For any digit position i ≥ 1, the place value 6i is always a multiple of 6. Therefore, the difference (c − di) 6i is always an even number and always a multiple of 3.

When you add or subtract a multiple of 2 and 3 to a prime number N, the resulting number maintains the exact same divisibility properties as N modulo 2 and modulo 3. Consequently, any substitution made to the 61, 62, 63 … positions will never produce a number divisible by 2 or 3.

The Statistical Improbability

To satisfy the weakly prime condition, every possible digit substitution must result in a composite number.

In the general integer population, about 66.7% of all numbers are composite simply by being even or a multiple of 3. However, because of the divisibility shield, none of the modified numbers from the higher digit positions can take this "easy" path to being composite. They are forced into the remaining 33.3% of the number line—numbers coprime to 6—where the density of primes is three times higher.

For 334155 in base 6, there are 5 higher digit positions (i ≥ 1), and changing them to the other 5 valid digits yields 25 different modified numbers. All 25 of these must simultaneously be composite, but their prime factors must be drawn exclusively from larger primes (5, 7, 11, 13, etc.). Finding a cluster where 25 specific numbers coprime to 6 all happen to hit composite numbers requires venturing much further up the number line, which is why the sequence jumps so violently to 28151.

You can observe this exact same behavior in OEIS A186995 whenever the base has multiple distinct prime factors. For base 10 (factors 2 and 5), the smallest weakly prime is 294001. For base 12 (factors 2 and 3), it rockets to 20837899. Conversely, in a prime base like base 5 (where the answer is just 83), changing a higher digit easily flips the number from odd to even, quickly satisfying the composite requirement.