Monday, 11 August 2025

Prime Sum of Divisors

Surprisingly, for me at least, there are not many numbers whose sum of divisors is prime. However, the number associated with my diurnal age today, \( \textbf{27889}\), is one such number. The numbers up to 40000 are 2, 4, 9, 16, 25, 64, 289, 729, 1681, 2401, 3481, 4096, 5041, 7921, 10201, 15625, 17161, 27889, 28561 and 29929. These are the initial terms of OEIS A023194. Here is the breakdown (with 2 excluded - permalink):

number   square root   sigma

  4        2             7
  9        3             13
  16       4             31
  25       5             31
  64       8             127
  289      17            307
  729      27            1093
  1681     41            1723
  2401     49            2801
  3481     59            3541
  4096     64            8191
  5041     71            5113
  7921     89            8011
  10201    101           10303
  15625    125           19531
  17161    131           17293
  27889    167           28057
  28561    169           30941
  29929    173           30103

The members of this sequence are all square numbers with the exception of 2. Some are powers of 2 as well such as 16, 64 and 4096. The OEIS comments contain the following observations (that I'm not sure I understand):

All terms except the first are squares. Why? 
 
Answer from Gabe Cunningham (gcasey@mit.edu): "From the fact that the sigma (the sum-of-divisors function) is multiplicative, we can derive that the \( \sigma(n)\) is even except when \(n\) is a square or twice a square. 
 
"If \(n = 2 \times (2 \times k + 1)^2\), that is, \(n\) is twice an odd square, then:$$ \sigma(n) = 3 \times \sigma((2 \times k + 1)^2)$$If \(n = 2 \times (2 \times k)^2 \), that is, \(n\) is twice an even square, then \( \sigma(n)\) is only prime if \(n\) is a power of 2; otherwise we have:$$ \sigma(n) = \sigma(8 \times 2^m) \times \sigma(k/2^m)$$ for some positive integer \(m\). 
 
"So the only possible candidates for values of n other than squares such that \( \sigma(n)\) is prime are odd powers of 2. But:$$ \begin{align} \sigma(2^{(2 \times m + 1)}) &= 2^{(2 \times m + 2)} - 1 \\ &= (2^{m + 1} + 1) \times (2^{m + 1 }- 1) \end{align}$$which is only prime when \(m = 0\), that is, when \(n = 2\). So 2 is the only nonsquare \(n\) such that \( \sigma(n)\) is prime."


I looked to Gemini to explain what the above means by asking the following question;

What does it mean to say that "the sigma function is multiplicative" where sigma is the sum of divisors function? The fuller quote is as follows: 

... I just included the quote above ...

The quote is taken from the comments to OEIS A023194 (https://oeis.org/A023194). Can you break this down for me as I simply don't understand what the author is on about?

Here was the response (link):

Of course. Let's break down this number theory argument step by step. It's a great example of how a single property of a function can lead to a powerful conclusion.

What does "Multiplicative" Mean?

First, let's tackle the main concept. In number theory, a function f(n) is called multiplicative if, for any two coprime integers a and b, the following equation holds true:

f(a * b) = f(a) * f(b)

Coprime means that the two numbers share no common factors other than 1. For example, 4 and 9 are coprime, but 6 and 9 are not (they share a common factor of 3).

The sigma function, written as σ(n), calculates the sum of all the positive divisors of a number n.

Let's test the multiplicative property with an example, n = 12.

We can split 12 into the coprime factors 3 and 4.

  • σ(12): The divisors of 12 are 1, 2, 3, 4, 6, and 12. Their sum is 1 + 2 + 3 + 4 + 6 + 12 = 28.

  • σ(3): The divisors of 3 are 1 and 3. Their sum is 1 + 3 = 4.

  • σ(4): The divisors of 4 are 1, 2, and 4. Their sum is 1 + 2 + 4 = 7.

Now let's check if the property holds:

σ(3) * σ(4) = 4 * 7 = 28

It works! σ(12) = σ(3) * σ(4). This property is incredibly useful because it allows us to find σ(n) by first finding the prime factorization of n. If n = p₁^a₁ * p₂^a₂ * ..., then σ(n) = σ(p₁^a₁) * σ(p₂^a₂) * ....


Deconstructing the Argument

Now, let's walk through the author's logic for finding the non-square numbers n where σ(n) is prime. The goal is to eliminate all possibilities until only one remains.

Part 1: When is σ(n) an odd number?

The author starts with the fact that σ(n) is almost always even. For σ(n) to be a prime number (other than 2), it must be an odd prime. So, when is σ(n) odd?

σ(n) is odd only if all the factors in its prime decomposition, σ(p₁^a₁), σ(p₂^a₂), ..., are also odd.

  • For powers of 2 (p=2): σ(2^a) = 1 + 2 + 4 + ... + 2^a = 2^(a+1) - 1. This sum is always odd. (e.g., σ(4) = 7, σ(8) = 15).6

  • For powers of an odd prime (p is odd): σ(p^a) = 1 + p + p² + ... + p^a. This sum of numbers is odd only if there is an odd number of terms. The number of terms is a+1. For a+1 to be odd, a must be even.

So, for σ(n) to be odd, any odd prime factor in n must have an even exponent. This means n must be of the form:

n = 2^k * (an odd number that is a perfect square)

This leads to two cases:

  1. k is even: n is a perfect square (e.g., 2² * 3² = 6²).

  2. k is odd: n is twice a perfect square (e.g., 2³ * 5² = 2 * (2*5)² = 2 * 10²).

The author states: σ(n) is odd only when n is a square or twice a square. This is the conclusion. Since we are looking for non-square values of n, this immediately tells us we only need to check numbers that are twice a square.

Part 2: Analyzing n as "Twice a Square"

We've narrowed our search to n = 2k². The author now splits this into two sub-cases based on whether k is odd or even.

  • Case A: n is twice an odd square. (n = 2 * m², where m is odd).

    Since 2 and m² are coprime, we can use the multiplicative property:

    σ(n) = σ(2 * m²) = σ(2) * σ(m²) = 3 * σ(m²)

    For this result (3 * σ(m²)) to be a prime number, it must be equal to 3. This is only possible if σ(m²) = 1. The only number whose sum of divisors is 1 is the number 1 itself. So m² = 1, which means m = 1.

    This gives us our first candidate: n = 2 * 1² = 2.

    Let's check: σ(2) = 1 + 2 = 3, which is a prime number. And n=2 is not a square. So, 2 is a solution.

  • Case B: n is twice an even square. (n = 2 * m², where m is even).

    Let the even number m = 2^j * s, where s is an odd number and j ≥ 1.

    Then n = 2 * (2^j * s)² = 2 * 2^(2j) * s² = 2^(2j+1) * s².

    This n is composed of an odd power of 2 (2^(2j+1)) and an odd square (s²). These two parts are coprime.

    σ(n) = σ(2^(2j+1)) * σ(s²)

    As we established, both σ(power of 2) and σ(odd square) are odd numbers greater than 1 (assuming s > 1). When you multiply two integers that are both greater than 1, the result is a composite (non-prime) number.

    Therefore, for σ(n) to have any chance of being prime, the s² part must not exist. This means s must be 1.

Part 3: The Final Elimination

The previous step forces us to conclude that the only possible candidates left are when s=1. This means n must be an odd power of 2.

n = 2^(2m+1) for m ≥ 0.

Let's find the sigma of this number:

σ(n) = σ(2^(2m+1)) = 2^((2m+1)+1) - 1 = 2^(2m+2) - 1

The author then uses a standard algebraic factorization for a difference of squares (a² - b² = (a-b)(a+b)):

2^(2m+2) - 1 = (2^(m+1))² - 1² = (2^(m+1) - 1) * (2^(m+1) + 1)

For this product to be a prime number, one of its factors must be equal to 1.

  • The second factor, (2^(m+1) + 1), is clearly larger than 1.

  • Therefore, the first factor must be 1:

    2^(m+1) - 1 = 1

    2^(m+1) = 2

    m+1 = 1

    m = 0

Plugging m=0 back into our formula for n:

n = 2^(2*0 + 1) = 2¹ = 2.

This confirms that the only possible candidate that survived this entire process of elimination is the number 2.

Summary

The author brilliantly uses the multiplicative nature of σ(n) to prove that 2 is the only non-square number whose sum of divisors is a prime number. 

I'm not sure I'm any the wiser but we definitely all such numbers are squares!

Anyway, by contrast, numbers for which the sum of the \( \textbf{proper}\) divisors is prime are far more common. There are 3771 of them in the range up to 40000.

Sunday, 10 August 2025

Runs of Numbers with Four or More Prime Factors

Recently, I noticed that the numbers from 27872 to 27876 had four or more prime factors with multiplicity. Specifically:$$ \begin{align} 27872 &= 2^5 \times 13 \times 67 \\ 27873 &= 3^2 \times 19 \times 163 \\ 27874 &= 2 \times 7 \times 11 \times 181 \\ 27875 &= 5^3 \times 223 \\ 27876 &= 2^2 \times 3 \times 23 \times 101 \end{align} $$This got me wondering how often these runs of five numbers with four or more factors occur. It turns out not often. In the range up to 40000, there are only 11 such numbers:$$12122, 14748, 17574, 19940, 22382, 27872, 28592, 29886, 35072, 35124, 39444$$The details are as follows (permalink):

  • \(12122 = 2 \times 11 \times 19 \times 29 \)
  • \(12123 = 3^3 \times 449 \)
  • \(12124 = 2^2 \times 7 \times 433 \)
  • \(12125 = 5^3 \times 97 \)
  • \(12126 = 2 \times 3 \times 43 \times 47 \)

  • \(14748 = 2^2 \times 3 \times 1229 \)
  • \(14749 = 7^3 \times 43 \)
  • \(14750 = 2 \times 5^3 \times 59 \)
  • \(14751 = 3^2 \times 11 \times 149 \)
  • \(14752 = 2^5 \times 461 \)

  • \(17574 = 2 \times 3 \times 29 \times 101 \)
  • \(17575 = 5^2 \times 19 \times 37 \)
  • \(17576 = 2^3 \times 13^3 \)
  • \(17577 = 3^4 \times 7 \times 31 \)
  • \(17578 = 2 \times 11 \times 17 \times 47 \)

  • \(19940 = 2^2 \times 5 \times 997 \)
  • \(19941 = 3 \times 17^2 \times 23 \)
  • \(19942 = 2 \times 13^2 \times 59 \)
  • \(19943 = 7^2 \times 11 \times 37 \)
  • \(19944 = 2^3 \times 3^2 \times 277 \)

  • \(22382 = 2 \times 19^2 \times 31 \)
  • \(22383 = 3^3 \times 829 \)
  • \(22384 = 2^4 \times 1399 \)
  • \(22385 = 5 \times 11^2 \times 37 \)
  • \(22386 = 2 \times 3 \times 7 \times 13 \times 41 \)

  • \(27872 = 2^5 \times 13 \times 67 \)
  • \(27873 = 3^2 \times 19 \times 163 \)
  • \(27874 = 2 \times 7 \times 11 \times 181 \)
  • \(27875 = 5^3 \times 223 \)
  • \(27876 = 2^2 \times 3 \times 23 \times 101 \)

  • \(28592 = 2^4 \times 1787 \)
  • \(28593 = 3^4 \times 353 \)
  • \(28594 = 2 \times 17 \times 29^2 \)
  • \(28595 = 5 \times 7 \times 19 \times 43 \)
  • \(28596 = 2^2 \times 3 \times 2383 \)

  • \(29886 = 2 \times 3 \times 17 \times 293 \)
  • \(29887 = 11^2 \times 13 \times 19 \)
  • \(29888 = 2^6 \times 467 \)
  • \(29889 = 3^6 \times 41 \)
  • \(29890 = 2 \times 5 \times 7^2 \times 61 \)

  • \(35072 = 2^8 \times 137 \)
  • \(35073 = 3^4 \times 433 \)
  • \(35074 = 2 \times 13 \times 19 \times 71 \)
  • \(35075 = 5^2 \times 23 \times 61 \)
  • \(35076 = 2^2 \times 3 \times 37 \times 79 \)

  • \(35124 = 2^2 \times 3 \times 2927 \)
  • \(35125 = 5^3 \times 281 \)
  • \(35126 = 2 \times 7 \times 13 \times 193 \)
  • \(35127 = 3^3 \times 1301 \)
  • \(35128 = 2^3 \times 4391 \)

  • \(39444 = 2^2 \times 3 \times 19 \times 173 \)
  • \(39445 = 5 \times 7^3 \times 23 \)
  • \(39446 = 2 \times 11^2 \times 163 \)
  • \(39447 = 3^4 \times 487 \)
  • \(39448 = 2^3 \times 4931 \)

Up to ten million, the first runs of \( \textbf{six}\) numbers with \( \textbf{four} \) or more factors, counting multiplicity, start with 7451871, 8813580 and 8961325. Here are the details:

  • \(7451871 = 3 \times 7^2 \times  163 \times  311 \)
  • \(7451872 = 2^5 \times  232871 \)
  • \(7451873 = 11 \times  13 \times  31 \times  41^2 \)
  • \(7451874 = 2 \times  3^2 \times  37 \times  67 \times  167 \)
  • \(7451875 = 5^4 \times  11923 \)
  • \(7451876 = 2^2 \times  19 \times  71 \times  1381 \)

  • \(8813580 = 2^2 \times  3 \times  5 \times  146893 \)
  • \(8813581 = 7^2 \times  43 \times  47 \times  89 \)
  • \(8813582 = 2 \times  17 \times  53 \times  67 \times  73 \)
  • \(8813583 = 3^3 \times  197 \times  1657 \)
  • \(8813584 = 2^4 \times  13 \times  42373 \)
  • \(8813585 = 5 \times  11 \times 37 \times  61 \times  71 \)

  • \(8961325 = 5^2 \times  31^2 \times  373 \)
  • \(8961326 = 2 \times  11 \times  37 \times  101 \times  109 \)
  • \(8961327 = 3^3 \times  61 \times  5441 \)
  • \(8961328 = 2^4 \times  560083 \)
  • \(8961329 = 13 \times  17 \times  23 \times  41 \times  43 \)
  • \(8961330 = 2 \times  3 \times  5 \times  7 \times  139 \times  307 \)

If we consider runs of \( \textbf{six}\) numbers with exactly \( \textbf{three}\) not necessarily distinct prime factors, then in the range up to 40000 the numbers 2522, 4921, 18241, 25553 and 27290 begin these runs (permalink).

If we consider runs of \( \textbf{three}\) numbers with exactly \( \textbf{two}\) not necessarily distinct prime factors, then in the range up to 40000 there are 189 such numbers. The numbers beginning these runs are shown below (permalink):

33, 85, 93, 121, 141, 201, 213, 217, 301, 393, 445, 633, 697, 841, 921, 1041, 1137, 1261, 1345, 1401, 1641, 1761, 1837, 1893, 1941, 1981, 2101, 2181, 2217, 2305, 2361, 2433, 2461, 2517, 2641, 2721, 2733, 3097, 3385, 3601, 3693, 3865, 3901, 3957, 4285, 4413, 4533, 4593, 4881, 5601, 5721, 5853, 5997, 6157, 6241, 6457, 7113, 7141, 7165, 7233, 7341, 7401, 7861, 7977, 8157, 8185, 8257, 8401, 8457, 8913, 9121, 9753, 9937, 9985, 10117, 10237, 11013, 11181, 11281, 11301, 11377, 11641, 11721, 11733, 11757, 12021, 12057, 12777, 13645, 13917, 13953, 14037, 14253, 14901, 14917, 14961, 14977, 14997, 15117, 15177, 15837, 16161, 16177, 16293, 16321, 16437, 16593, 17245, 17337, 17461, 17637, 17857, 18021, 18085, 18453, 18805, 18861, 19101, 19561, 19657, 19713, 19741, 19857, 20017, 20157, 20197, 20281, 21477, 22233, 22297, 22521, 22821, 23377, 24501, 24537, 25105, 25293, 26517, 26581, 26797, 27381, 27517, 27561, 27661, 27717, 27841, 28021, 28113, 28801, 28893, 29037, 29065, 29305, 29517, 29701, 29901, 30297, 30397, 30453, 30541, 30901, 30993, 31285, 31461, 31497, 31917, 32133, 32365, 33481, 34197, 34413, 34777, 34861, 35101, 35193, 35781, 35821, 35857, 35941, 36121, 37041, 37437, 37837, 38137, 38161, 38937, 39001, 39361, 39685

There cannot be runs of more than three numbers with two distinct prime factors because every fourth number will be a multiple of \(4 = 2 \times 2\).

Saturday, 9 August 2025

Primes from SOD and POD

I'm using the acronym SOD to stand for Sum Of Digits and POD to stand for Product Of Digits. In a blog June 2021 post titled SOD ET AL, I made mention of OEIS A047791:


 A047791

Numbers  such that  plus digit sum of  (A007953) equals a prime.       


In March of 2024, I made a blog post titled More Sequences Involving SOD and POD in which I looked at semiprimes and sphenic numbers that remain semiprimes and sphenic numbers when their sums of digits and products of digits are added to them. For some reason, I've never looked at numbers that become prime when their sum of digits is added to them and that also become prime when their product of digits is added to them. When considering the product of digits of a number, it's usual to exclude numbers containing a zero because then the product of digits is alway zero. However, the decision can be made to exclude any zero digits in the multiplication.

Let's consider the first approach where numbers containing a zero are excluded from consideration. How many numbers \(n\) in the range up to 40000, satisfy the following criteria:
  • \(n\) does not contain the digit 0
  • \(n\) + SOD(\(n )\) \( \rightarrow \) a prime number
  • \(n\) + POD(\(n )\) \( \rightarrow \) a prime number
There are 351 such numbers (permalink):

1, 163, 233, 253, 293, 341, 343, 431, 473, 493, 499, 563, 611, 617, 743, 767, 923, 1241, 1421, 1423, 1483, 1489, 1849, 1867, 2147, 2231, 2233, 2273, 2327, 2369, 2413, 2543, 2569, 2633, 2639, 2783, 2839, 3287, 3449, 3649, 3661, 3829, 4121, 4211, 4217, 4273, 4387, 4459, 4529, 4547, 4729, 4921, 5263, 5461, 5627, 5663, 5861, 6121, 6127, 6181, 6527, 6529, 6617, 6637, 6653, 6743, 6761, 6857, 6949, 7223, 7429, 7681, 8273, 8431, 8491, 8569, 8671, 8789, 8837, 8839, 8899, 8983, 9263, 9641, 9649, 9689, 9869, 9881, 9889, 11233, 11237, 11251, 11297, 11341, 11567, 11581, 11611, 11657, 11677, 11897, 11899, 12151, 12379, 12443, 12553, 12557, 12667, 12797, 12977, 13163, 13211, 13231, 13321, 13453, 13457, 13523, 13547, 13673, 13697, 13729, 13837, 13877, 13879, 13891, 13969, 14137, 14311, 14353, 14423, 14429, 14467, 14483, 14533, 14537, 14623, 14641, 14647, 14689, 14957, 15121, 15167, 15217, 15257, 15277, 15361, 15413, 15451, 15491, 15619, 15721, 15727, 15769, 15781, 15859, 15947, 16319, 16391, 16427, 16513, 16577, 16799, 16993, 16997, 17183, 17299, 17329, 17837, 17879, 18197, 18229, 18287, 18517, 18559, 18751, 19381, 19411, 19457, 19523, 19549, 19583, 19673, 19691, 19741, 19831, 19859, 21311, 21379, 21467, 21511, 21577, 21593, 21737, 21751, 21977, 21991, 22121, 22123, 22259, 22369, 22387, 22549, 22657, 22747, 22837, 22921, 22981, 23117, 23179, 23269, 23353, 23519, 23573, 23599, 23719, 23731, 23791, 24259, 24343, 24499, 24527, 24761, 24949, 25111, 25153, 25223, 25283, 25319, 25333, 25441, 25517, 25519, 25577, 25681, 25771, 25847, 25913, 25991, 25997, 26233, 26251, 26273, 26323, 26611, 26699, 26927, 27157, 27263, 27317, 27427, 27511, 27887, 27931, 28181, 28213, 28853, 28877, 28981, 29113, 29117, 29153, 29171, 29179, 29281, 29357, 29597, 29621, 29731, 29887, 29933, 31141, 31213, 31217, 31493, 31613, 31651, 31697, 31789, 31837, 31853, 31879, 32111, 32173, 32281, 32357, 32447, 32539, 32687, 32689, 32957, 32971, 33383, 33413, 33527, 33547, 33581, 33587, 33769, 33851, 34247, 34313, 34339, 34463, 34577, 34667, 34681, 34793, 34861, 35143, 35251, 35257, 35323, 35417, 35521, 35569, 35699, 35783, 35831, 35873, 35981, 36229, 36287, 36469, 36559, 36661, 36919, 36953, 36991, 37321, 37369, 37547, 37613, 37637, 37871, 38221, 38351, 38683, 38689, 38719, 38887, 38939, 38951, 38959, 39161, 39361, 39493, 39521, 39587, 39653, 39691, 39943, 39947

The number associated with my diurnal age today, 27887, can be found in this list because:
  • SOD(27887) = 32 and POD(27887) = 6272
  • 27887 + 32 = 27919 which is a prime number
  • 27887 + 6272 = 34159 which is a prime number

If we require that the initial number \(n\) be prime, then only 136 numbers qualify. These numbers thus meet the following criteria:
  • \(n\) is prime and does not contain the digit 0
  • \(n\) + SOD(\(n) \) \( \rightarrow \) a prime number 
  • \(n\) + POD(\(n) \) \( \rightarrow \) a prime number 
Here are the numbers (permalink);

163, 233, 293, 431, 499, 563, 617, 743, 1423, 1483, 1489, 1867, 2273, 2543, 2633, 3449, 4211, 4217, 4273, 4547, 4729, 5861, 6121, 6529, 6637, 6653, 6761, 6857, 6949, 7681, 8273, 8431, 8837, 8839, 9649, 9689, 11251, 11657, 11677, 11897, 12379, 12553, 13163, 13457, 13523, 13697, 13729, 13877, 13879, 14423, 14533, 14537, 14957, 15121, 15217, 15277, 15361, 15413, 15451, 15619, 15727, 15859, 16319, 16427, 16993, 17183, 17299, 17837, 18229, 18287, 18517, 19381, 19457, 19583, 21379, 21467, 21577, 21737, 21751, 21977, 21991, 22123, 22259, 22369, 22549, 22921, 23117, 23269, 23599, 23719, 24499, 24527, 25111, 25153, 25577, 25771, 25847, 25913, 25997, 26251, 26699, 26927, 27427, 28181, 29153, 29179, 32173, 32687, 32957, 32971, 33413, 33547, 33581, 33587, 33769, 33851, 34313, 34667, 35251, 35257, 35323, 35521, 35569, 35831, 36229, 36469, 36559, 36919, 37321, 37369, 37547, 37871, 38351, 38959, 39161, 39521

If we decide to include numbers containing the digit 0 (but exclude them in the multiplication) then 444 numbers qualify in the range up to 40000. For example, 10 qualifies since SOD(10) = 1 and POD(101) = 1 and 11 is prime. The criteria to be satisfied are thus:

  • \(n\) + SOD(\(n) \) \( \rightarrow \) a prime number 
  • \(n\) + POD(\(n) \) \( \rightarrow \) a prime number with 0 excluded from multiplication

Here are the numbers (permalink):

1, 10, 100, 163, 233, 253, 293, 341, 343, 431, 473, 493, 499, 563, 611, 617, 743, 767, 923, 1241, 1421, 1423, 1483, 1489, 1601, 1603, 1849, 1867, 2053, 2147, 2231, 2233, 2273, 2327, 2369, 2413, 2543, 2569, 2633, 2639, 2783, 2839, 2903, 3170, 3190, 3287, 3449, 3607, 3649, 3661, 3829, 3970, 4121, 4211, 4217, 4273, 4387, 4459, 4529, 4547, 4729, 4903, 4909, 4921, 5063, 5263, 5461, 5627, 5663, 5861, 6037, 6053, 6059, 6073, 6103, 6121, 6127, 6181, 6509, 6527, 6529, 6617, 6637, 6653, 6703, 6743, 6761, 6857, 6949, 7043, 7190, 7223, 7310, 7403, 7429, 7681, 8059, 8273, 8431, 8491, 8569, 8671, 8789, 8837, 8839, 8899, 8983, 9043, 9263, 9310, 9403, 9409, 9641, 9649, 9689, 9869, 9881, 9889, 10061, 10243, 10261, 10421, 10447, 10669, 10843, 10847, 11233, 11237, 11251, 11297, 11341, 11567, 11581, 11611, 11657, 11677, 11897, 11899, 12041, 12061, 12151, 12379, 12401, 12443, 12553, 12557, 12601, 12667, 12797, 12809, 12977, 13163, 13211, 13231, 13321, 13453, 13457, 13523, 13547, 13673, 13697, 13700, 13729, 13837, 13877, 13879, 13891, 13969, 14021, 14041, 14137, 14311, 14353, 14407, 14423, 14429, 14467, 14483, 14533, 14537, 14623, 14641, 14647, 14689, 14807, 14957, 15121, 15167, 15217, 15257, 15277, 15361, 15413, 15451, 15491, 15619, 15721, 15727, 15769, 15781, 15859, 15947, 16067, 16319, 16391, 16427, 16513, 16577, 16799, 16993, 16997, 17183, 17299, 17329, 17837, 17879, 18197, 18203, 18209, 18229, 18287, 18517, 18559, 18751, 19381, 19411, 19457, 19523, 19549, 19583, 19673, 19691, 19700, 19741, 19831, 19859, 20093, 20141, 20273, 20323, 20327, 20369, 20491, 20729, 20923, 20927, 21311, 21379, 21467, 21511, 21577, 21593, 21601, 21737, 21751, 21803, 21977, 21991, 22121, 22123, 22259, 22369, 22387, 22549, 22657, 22703, 22747, 22837, 22921, 22981, 23003, 23083, 23117, 23179, 23269, 23353, 23519, 23573, 23599, 23719, 23731, 23791, 24011, 24077, 24101, 24259, 24343, 24499, 24503, 24527, 24761, 24949, 25003, 25043, 25111, 25153, 25223, 25283, 25319, 25333, 25441, 25517, 25519, 25577, 25681, 25771, 25847, 25913, 25991, 25997, 26093, 26101, 26233, 26251, 26273, 26323, 26611, 26699, 26927, 27043, 27157, 27263, 27317, 27407, 27427, 27511, 27887, 27931, 28181, 28213, 28303, 28853, 28877, 28981, 29113, 29117, 29153, 29171, 29179, 29281, 29357, 29597, 29621, 29731, 29887, 29933, 30130, 30449, 30481, 30487, 31070, 31141, 31213, 31217, 31493, 31613, 31651, 31697, 31789, 31837, 31853, 31879, 32111, 32173, 32281, 32357, 32447, 32539, 32687, 32689, 32957, 32971, 33383, 33413, 33527, 33547, 33581, 33587, 33769, 33851, 34247, 34313, 34339, 34409, 34463, 34577, 34609, 34667, 34681, 34793, 34861, 35143, 35251, 35257, 35323, 35417, 35521, 35569, 35699, 35783, 35831, 35873, 35981, 36023, 36047, 36229, 36287, 36469, 36559, 36607, 36661, 36919, 36953, 36991, 37070, 37300, 37321, 37369, 37547, 37613, 37637, 37700, 37871, 38023, 38221, 38351, 38683, 38689, 38719, 38801, 38807, 38887, 38939, 38951, 38959, 39161, 39361, 39493, 39521, 39587, 39653, 39691, 39943, 39947

If the initial number is required to be prime, then only 170 numbers satisfy the following criteria:

  • \(n\) is prime
  • \(n\) + SOD(\(n) \) \( \rightarrow \) a prime number 
  • \(n\) + POD(\(n) \) \( \rightarrow \) a prime number with 0 excluded from multiplication
Here are the numbers (permalink):

163, 233, 293, 431, 499, 563, 617, 743, 1423, 1483, 1489, 1601, 1867, 2053, 2273, 2543, 2633, 2903, 3449, 3607, 4211, 4217, 4273, 4547, 4729, 4903, 4909, 5861, 6037, 6053, 6073, 6121, 6529, 6637, 6653, 6703, 6761, 6857, 6949, 7043, 7681, 8059, 8273, 8431, 8837, 8839, 9043, 9403, 9649, 9689, 10061, 10243, 10847, 11251, 11657, 11677, 11897, 12041, 12379, 12401, 12553, 12601, 12809, 13163, 13457, 13523, 13697, 13729, 13877, 13879, 14407, 14423, 14533, 14537, 14957, 15121, 15217, 15277, 15361, 15413, 15451, 15619, 15727, 15859, 16067, 16319, 16427, 16993, 17183, 17299, 17837, 18229, 18287, 18517, 19381, 19457, 19583, 20323, 20327, 20369, 21379, 21467, 21577, 21601, 21737, 21751, 21803, 21977, 21991, 22123, 22259, 22369, 22549, 22921, 23003, 23117, 23269, 23599, 23719, 24077, 24499, 24527, 25111, 25153, 25577, 25771, 25847, 25913, 25997, 26251, 26699, 26927, 27043, 27407, 27427, 28181, 29153, 29179, 30449, 32173, 32687, 32957, 32971, 33413, 33547, 33581, 33587, 33769, 33851, 34313, 34667, 35251, 35257, 35323, 35521, 35569, 35831, 36229, 36469, 36559, 36607, 36919, 37321, 37369, 37547, 37871, 38351, 38959, 39161, 39521

Friday, 8 August 2025

Consecutive Numbers and Consecutive Primes

Let's take triplets of primes, starting with 2, 3 and 5, and find three consecutive numbers (let's call them \(k, k+1\) and \(k+3\)) that are divisible by these primes respectively. In other words, we need \(k\) to be a multiple of 2, \(k+1\) to be a multiple of 3 and \(k+2\) to be a multiple of 5. A little trial error shows that the value of \(k\) that satisfies is 8 because 2 divides 8, 3 divides 9 and 5 divides 10. This triplet of numbers (8, 9 and 10) is the smallest that is divisible by 2, 3 and 5 respectively. As the primes get larger however, we need an algorithm to find the values of \(k, k+1\) and \(k+2\) that are divisible by consecutive primes \(p, q\) and \(r\). Here is the permalink to an algorithm that will do just that. The results are shown below.

  prime 1   prime 2   prime 3   number 1   number 2   number 3

  2         3         5         8          9          10
  3         5         7         54         55         56
  5         7         11        20         21         22
  7         11        13        791        792        793
  11        13        17        1936       1937       1938
  13        17        19        169        170        171
  17        19        23        4046       4047       4048
  19        23        29        114        115        116
  23        29        31        9453       9454       9455
  29        31        37        31929      31930      31931
  31        37        41        23901      23902      23903
  37        41        43        2664       2665       2666
  41        43        47        44977      44978      44979
  43        47        53        65188      65189      65190
  47        53        59        122482     122483     122484
  53        59        61        134991     134992     134993
  59        61        67        170982     170983     170984
  61        67        71        220027     220028     220029
  67        71        73        101103     101104     101105
  71        73        79        85555      85556      85557
  73        79        83        27886      27887      27888
  79        83        89        296724     296725     296726
  83        89        97        629140     629141     629142
  89        97        101       154326     154327     154328
  97        101       103       546207     546208     546209
  101       103       107       46864      46865      46866
  103       107       109       950587     950588     950589
  107       109       113       1043892    1043893    1043894
  109       113       127       1548890    1548891    1548892
  113       127       131       70738      70739      70740
  127       131       137       702945     702946     702947
  131       137       139       2389964    2389965    2389966
  137       139       149       1513987    1513988    1513989
  139       149       151       416305     416306     416307
  149       151       157       3386174    3386175    3386176
  151       157       163       3220226    3220227    3220228
  157       163       167       1531221    1531222    1531223
  163       167       173       2865051    2865052    2865053
  167       173       179       4309602    4309603    4309604
  173       179       181       3968966    3968967    3968968
  179       181       191       826264     826265     826266
  181       191       193       3557374    3557375    3557376
  191       193       197       2119718    2119719    2119720
  193       197       199       4096811    4096812    4096813
  197       199       211       1823038    1823039    1823040
  199       211       223       8583268    8583269    8583270
  211       223       227       7453997    7453998    7453999
  223       227       229       9175112    9175113    9175114
  227       229       233       9590977    9590978    9590979
  229       233       239       3294852    3294853    3294854

The number associated with my diurnal age today, 27886, appears in the above list and is associated with the primes 73, 79 and 83. Thus we have:$$ \begin{align} 27886 &= 2 \times \textbf{73} \times 191 \\ 27887 &= \textbf{79} \times 353 \\ 27888 &= 2^4 \times 3 \times 7 \times \textbf{83} \end{align} $$Figure 1 shows a plot of the prime 1 against number 1 with some annotations added. Though the trend of number 1's is upward, there is a lot of up and down along the way. The vertical axis of the graph is logarithmic.


Figure 1

Thursday, 7 August 2025

Totient and Sigma Graphs Revisited

Not long ago, in March of 2025, I made a blog post titled Totient Function: Jagged Versus Rounded Local Minima about a special feature in the graph of the totient function. I termed this special feature the "rounded local minimum" as opposed to the more "jagged local minimum". I was reminded of this graphical curiousity because today the number associated with my diurnal age, 27885, marks such a rounded local minimum or "2-nadirs" as the OEIS puts it. Such numbers belong to OEIS A076773 : 


  A076773: 2-nadirs of \( \phi\): numbers \(k\) such that:

 \( \phi(k-2) > \phi(k-1) > \phi(k) < \phi(k+1) < \phi(k+2)\).


Figure 1 shows a graph of the numbers and the totients in the region of 27885:


Figure 1

In relation to the sigma or sum of divisors function, 27885 exhibits what might be called a "local rounded maximum" as opposed to a "jagged local maximum". These I also discuss in my Totient Function: Jagged Versus Rounded Local Minima blog. Figure 2 shows the situation.


Figure 2
Such numbers constitute OEIS A323380:


A323380
   Odd \(k\) such that \( \sigma(k) > \sigma(k+1) \) and \( \sigma(k) > \sigma(k-1) \)

This turns out to be the same as A076773 with "sigma" replacing "phi" and "zenith" replacing "nadir":

  2-zeniths of \( \sigma\): numbers \(k\) such that:

 \( \sigma(k-2) > \sigma(k-1) > \sigma(k) < \sigma (k+1) < \sigma(k+2)\).


In the previously mentioned blog, I listed the numbers in OEIS A076773 and A323380 up to 40000 but I didn't realise at the time how many numbers these two sequences had in common. Here are the numbers that belong in both sequences (up to 40000):

315, 525, 1155, 1575, 1755, 1785, 1995, 2475, 2805, 3045, 3315, 3465, 3885, 4095, 4125, 4515, 4725, 5115, 5355, 5775, 6045, 6195, 6405, 6435, 6615, 6825, 7035, 7245, 7605, 8085, 8505, 8715, 8925, 9135, 9405, 9555, 9765, 9975, 10395, 11235, 11385, 11445, 11655, 12075, 12285, 12675, 12705, 12915, 13125, 13545, 13965, 14025, 14175, 14355, 14595, 14805, 15015, 15435, 15645, 15675, 16005, 16065, 16275, 16335, 16695, 16905, 17325, 17745, 17955, 18135, 18375, 18585, 18795, 19215, 19635, 20475, 20685, 21105, 21315, 21525, 21945, 22365, 22605, 22995, 23205, 23595, 23625, 23835, 24255, 24675, 24885, 24915, 25245, 25515, 25725, 25935, 26325, 26565, 26775, 27027, 27195, 27885, 28035, 28215, 28245, 28275, 28665, 28875, 29295, 29925, 30195, 30345, 30555, 30723, 30765, 31185, 31365, 31395, 31605, 31815, 32025, 32175, 32235, 32445, 32835, 33075, 33345, 33495, 33915, 34125, 34155, 34485, 34515, 34755, 34965, 35175, 35805, 36225, 36435, 36645, 36795, 36855, 37275, 37485, 38115, 38745, 38955, 39165, 39195, 39375, 39435, 39585, 39765, 39795

There are 238 totients and 267 sigmas with 154 in common (permalink).

Wednesday, 6 August 2025

Wordle Statistics Update

Here are my latest Wordle statistics as of August 6th 2025:


It turns out that I've lost 25 games out of the total of 908 games that I've played. This corresponds to a win rate of 97.25% which Wordle has rounded down to the 97% shown above. My average is \( \textbf{3.94} \) guesses which is a slight increase from the \( \textbf{3.92} \) guesses recorded on the 7th October 2024. Is this a sign of mental decline or is Wordle getting slightly more difficult?

What has changed significantly however, is my win rate. On the previous date it was 98.25%. I had lost only 11 games out of the 629 games that I'd played. Since then I've lost another 14 games which has seriously impacted my win rate. I put the following question to Gemini:
Are there any statistics to support the fact that Wordle, the online word game, is getting more difficult over the past year or more. I'm interested because my win rate in the game has dropped from 98.25% to 97.25% over the past year. Am I getting worse or is Wordle getting harder. I'd be curious to know.

This is an excellent question that gets to the heart of a common Wordle player's frustration. The short answer is: yes, there's evidence to suggest that the game is, in fact, getting harder. Your experience is not just a personal feeling; it's a trend that has been observed and analyzed.

While The New York Times, which acquired Wordle, has stated that they haven't intentionally made the game more difficult, and even removed some more obscure words, the inherent structure of the game's pre-determined word list is the likely culprit.

Here's a breakdown of the statistical and logical reasons why Wordle is getting harder:

1. The Finite and Ordered Word List

The game's original creator, Josh Wardle, established a list of about 2,300 possible solution words. These were likely curated with common words appearing earlier in the list and more obscure or challenging words appearing later. As the game progresses through this list, the words naturally become less common, contain more unusual letter combinations, or have tricky repeating letters.

2. "Confusability" of Words

A major factor in a Wordle puzzle's difficulty is its "confusability"—that is, how many other valid five-letter words share a similar letter pattern. As the game's word list gets further in, there are more words that fit this profile. For example, a word ending in "-OUND" could be "FOUND," "MOUND," "ROUND," "POUND," etc. As you get hints, you might narrow it down to the correct letters but be left with several possibilities for your last few guesses, making a loss more likely. Words with repeated letters, like "MOMMY" or "CORER," also fall into this category and have a higher failure rate.

3. Data from WordleBot and Player Averages

The New York Times' own tool, WordleBot, analyzes player data for each puzzle, including the average number of guesses and the solve rate. This data has shown that certain words are consistently more difficult for players. For instance, an analysis of the "10 most difficult Wordles of 2024" showed words like "HUNCH," "FIBER," and "PIPER" had high average guess counts and low solve rates. These difficult words, with their repeated letters and multiple possible solutions, are appearing more frequently as the game's long-term list is exhausted. One report even noted that a recent month was "officially Wordle's toughest month ever," with an average score of 4.22, significantly higher than the game's overall average of around 3.97.

What This Means for You

Your win rate dropping from 98.25% to 97.25% is a very small, statistically normal change over a year, but it aligns with the overall trend of the game getting slightly more difficult. It's highly unlikely that you are "getting worse" at the game; rather, the game's inherent difficulty is increasing. The words are becoming less common and are more likely to have the characteristics that make a puzzle a "streak-breaker."