Showing posts with label arithmetic progression. Show all posts
Showing posts with label arithmetic progression. Show all posts

Wednesday, 1 July 2026

Sphenic Number Chains

My previous post on the topic of chains of semiprimes in arithmetic progression prompted me to investigate similar chains formed by sphenic numbers. This time we are looking for the smallest sphenic number that is at the end of an arithmetic progression of \(n\) sphenic numbers as \(n\) ranges from 1 upwards. The result for \(n\) up to 18 is as follows (permalink):

30, 42, 102, 138, 174, 442, 1010, 2278, 2422, 6494, 10322, 10586, 12694, 21434, 28466, 56426, 62902, 145930

Let's look at 28466 that is at the end of a chain of 15 sphenic numbers with a common difference of 96 (permalink):

Arithmetic Progression of 15 Sphenic Numbers
Common Difference: 96
-------------------------------------------------------
Term   | Sphenic Number   | Factorisation
-------------------------------------------------------
1      | 27122            | 2 x 71 x 191
2      | 27218            | 2 x 31 x 439
3      | 27314            | 2 x 7 x 1951
4      | 27410            | 2 x 5 x 2741
5      | 27506            | 2 x 17 x 809
6      | 27602            | 2 x 37 x 373
7      | 27698            | 2 x 11 x 1259
8      | 27794            | 2 x 13 x 1069
9      | 27890            | 2 x 5 x 2789
10     | 27986            | 2 x 7 x 1999
11     | 28082            | 2 x 19 x 739
12     | 28178            | 2 x 73 x 193
13     | 28274            | 2 x 67 x 211
14     | 28370            | 2 x 5 x 2837
15     | 28466            | 2 x 43 x 331
-------------------------------------------------------

Other tables can be generated for the other values of \(n\) but the above table is the most relevant because it covers numbers (28274, 28370 and 28466) that are upcoming for me in terms of my diurnal age.

Here are the results for 16 sphenic numbers in arithmetic progression:

Arithmetic Progression of 16 Sphenic Numbers
Common Difference: 708
-------------------------------------------------------
Term   | Sphenic Number   | Factorisation
-------------------------------------------------------
1      | 45806            | 2 x 37 x 619
2      | 46514            | 2 x 13 x 1789
3      | 47222            | 2 x 7 x 3373
4      | 47930            | 2 x 5 x 4793
5      | 48638            | 2 x 83 x 293
6      | 49346            | 2 x 11 x 2243
7      | 50054            | 2 x 29 x 863
8      | 50762            | 2 x 17 x 1493
9      | 51470            | 2 x 5 x 5147
10     | 52178            | 2 x 7 x 3727
11     | 52886            | 2 x 31 x 853
12     | 53594            | 2 x 127 x 211
13     | 54302            | 2 x 19 x 1429
14     | 55010            | 2 x 5 x 5501
15     | 55718            | 2 x 13 x 2143
16     | 56426            | 2 x 89 x 317
-------------------------------------------------------

Semiprime Chains

My diurnal age today, 28213, is a member of OEIS A096003:


A096003: \( \textbf{smallest}\) semiprime which is at the \( \textbf{end}\) of an arithmetic progression of \(n\) semiprimes.

The initial terms of the sequence are:

4, 6, 14, 46, 58, 221, 445, 497, 1211, 1561, 4195, 4393, 6347, 10717, 14233, 28213, 31451, 72965

In the case of 28213, the chain is 16 semiprimes long with a common difference of 354 as shown in the table below  (permalink):

Semiprime    | Factors
------------------------------
22903        | 37 * 619
23257        | 13 * 1789
23611        | 7 * 3373
23965        | 5 * 4793
24319        | 83 * 293
24673        | 11 * 2243
25027        | 29 * 863
25381        | 17 * 1493
25735        | 5 * 5147
26089        | 7 * 3727
26443        | 31 * 853
26797        | 127 * 211
27151        | 19 * 1429
27505        | 5 * 5501
27859        | 13 * 2143
28213        | 89 * 317

The terms in comma separated form are:

22903, 23257, 23611, 23965, 24319, 24673, 25027, 25381, 25735, 26089, 26443, 26797, 27151, 27505, 27859, 28213

28213 is also an emirpimes since \(31282 = 2 \times 15641\) and even the factors of 28213 when concatenated from higher to lower form the semiprime \(31789 = 83 \times 383\).

The next term in OEIS A096003 after 29213 is 31451 and it is at the end of a chain of 17 semiprimes with a common difference of 1860 as shown in the table below (permalink)

Semiprime    | Factors
------------------------------
1691          | 19 * 89
3551          | 53 * 67
5411          | 7 * 773
7271          | 11 * 661
9131          | 23 * 397
10991        | 29 * 379
12851        | 71 * 181
14711        | 47 * 313
16571        | 73 * 227
18431        | 7 * 2633
20291        | 103 * 197
22151        | 17 * 1303
24011        | 13 * 1847
25871        | 41 * 631
27731        | 11 * 2521
29591        | 127 * 233
31451        | 7 * 4493

The terms in comma separated form are:

1691, 3551, 5411, 7271, 9131, 10991, 12851, 14711, 16571, 18431, 20291, 22151, 24011, 25871, 27731, 29591, 31451

After 31451 comes 72965 that is at the end of a chain of 18 semiprimes with a common difference of 3942 as shown in the table below (permalink):

Semiprime    | Factors
------------------------------
5951          | 11 * 541
9893          | 13 * 761
13835        | 5 * 2767
17777        | 29 * 613
21719        | 37 * 587
25661        | 67 * 383
29603        | 7 * 4229
33545        | 5 * 6709
37487        | 19 * 1973
41429        | 17 * 2437
45371        | 59 * 769
49313        | 11 * 4483
53255        | 5 * 10651
57197        | 7 * 8171
61139        | 13 * 4703
65081        | 151 * 431
69023        | 23 * 3001
72965        | 5 * 14593

The terms in comma separated form are:

5951, 9893, 13835, 17777, 21719, 25661, 29603, 33545, 37487, 41429, 45371, 49313, 53255, 57197, 61139, 65081, 69023, 72965 

Saturday, 27 June 2026

Prime Magic Squares

The number associated with my diurnal age today, \( \textbf{28209} \), is a member of OEIS A269324:


A269324
: magic sums of 3 x 3 magic squares composed of primes in an arithmetic progression.

I was interested in finding out what these primes were and how they could be arranged so I sought help from Gemini. Here was what it came up with:

To construct a 3×3 magic square of primes in an arithmetic progression for the magic sum 28209 (a term from OEIS A269324), we need to determine the central prime, find the common difference of the progression, and then map those primes to the cells of the grid. Here is the complete step-by-step breakdown of the mathematics and the final arrangement.

1. Finding the Central Prime

In any 3×3 magic square, the central cell is always the average of the magic sum. Because the magic sum (\( S \)) is the total of any given row, column, or diagonal, the center prime is exactly \( S / 3 \).

$$ \text{Center} = \frac{28209}{3} = 9403 $$

Because the 9 primes must form an arithmetic progression, the central cell of the magic square must also be the median (the 5th term) of the sorted sequence. Therefore, our arithmetic progression of primes is centered at 9403.

2. Determining the Common Difference

Let \( d \) be the common difference. Our 9 primes will take the form of \( 9403 + kd \), where \( k \) ranges from \( -4 \) to \( 4 \).

According to prime arithmetic progression properties, an arithmetic progression of \( k \) primes must have a common difference divisible by every prime \( q \le k \) (unless the progression actually begins with \( q \)). Since our sequence contains 9 primes and does not start with 2, 3, 5, or 7, the common difference \( d \) must be a multiple of their primorial:

$$ d = 2 \times 3 \times 5 \times 7 = 210 $$

By testing the multiples of 210, we can find the exact difference where all 9 resulting terms are prime:

  • \( d = 210 \) fails because the term \( 9403 - 210 = 9193 \), which is \( 29 \times 317 \).
  • \( d = 420 \) fails because \( 9403 + 420 = 9823 \), which is \( 11 \times 19 \times 47 \).
  • \( d = 630 \) fails because \( 9403 - 3(630) = 7513 \), which is \( 11 \times 683 \).
  • \( d = 840 \) succeeds.

3. The Nine Primes

Using \( d = 840 \) and our center prime of 9403, we can generate the 9 primes for the magic square by stepping out by 840 in both directions:

  • \( 9403 - 4(840) = \) 6043
  • \( 9403 - 3(840) = \) 6883
  • \( 9403 - 2(840) = \) 7723
  • \( 9403 - 1(840) = \) 8563
  • 9403 (Center)
  • \( 9403 + 1(840) = \) 10243
  • \( 9403 + 2(840) = \) 11083
  • \( 9403 + 3(840) = \) 11923
  • \( 9403 + 4(840) = \) 12763

4. Arranging the Magic Square

To arrange these into a valid 3×3 magic square, we map our ordered sequence to the classic Lo Shu magic square structure. In the traditional 1–9 Lo Shu square, the numbers are placed so that opposites balance out across the center (5). Substituting our 1st through 9th primes directly into the equivalent positions of the Lo Shu configuration yields the following layout:

11923 6043 10243
7723 9403 11083
8563 12763 6883

Every row, column, and main diagonal in this grid perfectly sums to 28209. Keep in mind that any of the 8 standard symmetries (rotations or reflections) of this exact grid will also produce a valid magic square for this progression.

Saturday, 4 April 2026

The Antisigma Function

The \( \textbf{antisigma}\) function returns the sum of the proper non-divisors of \(n\). I hadn't heard of it before but came across reference to it when researching properties of the number 77. Let's designate this function as a(\(n\)) and use 15 as an example to illustrate how it works. The proper divisors of 15 are 1, 3 and 5. This means that 2, 4, 6, 7, 8, 9, 10, 11, 12, 13 and 14 are non-divisors and they total 96. Thus:$$a(15)=96$$A quicker way to calculate the sum of proper non-divisors is to use the following formula that makes use of the sum of the terms of an arithmetic sequence:$$ \begin{align} \text{a}(n) &= \frac{n(n+1)}{2} - \sigma(n) \\ \text{a}(15) &= \frac{15 \times 16}{ 2} - 24 \\ &=140-24\\&=96 \end{align} $$I had to be reminded as to the formula for the sum of the terms of an arithmetic progression with starting term \(a\) and common difference \(d\). The sum \( \text{S}_n \) of the first \(n\) terms is given by:$$ \begin{align} \text{S}_n &= \frac{n}{2}(2a+(n-1)d) \\ &= \frac{n (n+1)}{2} \text{ for }a=1 \text{ and } d=1 \end{align}$$The antisigma function differs from Euler's totient function that counts the number of integers up to a given number \(n\) that are coprime to \(n\). In the case of 15, we have:$$ \begin{align} \phi(15) &= 15 \times (1-\frac{1}{3}) \times (1-\frac{1}{5}) \\ &= 15 \times \frac{2}{3} \times \frac{4}{5} \\ &=8 \end{align}$$The eight numbers that are coprime to 15 are 1, 2, 4, 7, 8, 11, 13 and 14. 

The antisigma function relates to the non-divisors of a number and these differ from its antidivisors. The antidivisors of 15 are 2, 6 and 10. See blog More on Anti-divisors.

The OEIS includes various sequences relating to antisigma function. First and foremost there is OEIS A024816:


A024816: antisigma(\(n\)) which is the sum of the numbers less than \(n\) that do not divide \(n\).

This sequence begins:

0, 0, 2, 3, 9, 9, 20, 21, 32, 37, 54, 50, 77, 81, 96, 105, 135, 132, 170, 168, 199, 217, 252, 240, 294, 309, 338, 350, 405, 393, 464, 465, 513, 541, 582, 575, 665, 681, 724, 730, 819, 807, 902, 906, 957, 1009, 1080, 1052, 1168, 1182, 1254, 1280, 1377, 1365

Then there is OEIS A200981:


A200981: numbers \(k\) such that the sum of non-divisors of \(k\) is prime.

3, 4, 10, 21, 34, 46, 58, 70, 85, 93, 118, 129, 130, 144, 178, 201, 226, 237, 262, 298, 310, 322, 324, 325, 333, 334, 346, 382, 406, 418, 430, 466, 478, 502, 513, 514, 517, 549, 598, 622, 633, 634, 657, 658, 669, 706, 730, 742, 813, 826, 837, 838, 865, 922, 982, 985

Wednesday, 4 January 2023

What's Special About 256409?

 My diurnal age today, 26939, has the property that:

  • 2 x 26939 + 3 = 53881 is prime
  • 4 x 26939 + 5 = 107761 is prime
  • 6 x 26939 + 7 = 161641 is prime
  • 8 x 26939 + 9 = 215521 is prime

  • It thus belongs to a sequence of numbers \(n\) with the property that  \(2n+3\), \(4n+5 \), \(6n+7\) and \( 8n+9\) are all prime (A105653). The initial members of the sequence are:

    164, 764, 1529, 2129, 2474, 3419, 5414, 7694, 9059, 11504, 12704, 13019, 15884, 16649, 20054, 20744, 22529, 24914, 26939, 29669, 32924, 35069, 36884, 39269

    It's interesting to see how far we can extend this property. How many numbers will also yield a \(10n+11\) that is prime? Extending the range to one million, it can be seen that a quite a few numbers do qualify. They are:

    5414, 12704, 13019, 44369, 82949, 98279, 105524, 112199, 115139, 123854, 134249, 134459, 187739, 188744, 210164, 225704, 247169, 256409, 296309, 302084, 367874, 375644, 382889, 399584, 404039, 476339, 487829, 526844, 532094, 566429, 578084, 766184, 779789, 787709, 854174, 883889, 919334, 966839

    What about \(12n+13\) as well? The result is quite a few less. In fact only 12704, 13019, 105524, 256409 and 966839 qualify.

    256409

    When we try \(14n+15\), there is only one man left standing and that is 256409. Can this number go one further to \(16n+17\)? Indeed it can but at \(18n+19\), it fails. Here is a list of the primes produced along with the final composite number (all end in the digit 1) where "True" represents a prime number and "False" represents a composite number (permalink).
    • 2 x 256409 + 3 = 512821 True
    • 4 x 256409 + 5 = 1025641 True
    • 6 x 256409 + 7 = 1538461 True
    • 8 x 256409 + 9 = 2051281 True
    • 10 x 256409 + 11 = 2564101 True
    • 12 x 256409 + 13 = 3076921 True
    • 14 x 256409 + 15 = 3589741 True
    • 16 x 256409 + 17 = 4102561 True
    • 18 x 256409 + 19 = 4615381 False
    So it is for this reason that 256409 is rather special, at least in the range of positive integers up to one million. It is in fact the first member of OEIS A105657 containing numbers with the same property as 256409 but none of them can be the first! Here are the initial members of the sequence:

    256409, 11120339, 13243229, 49798979, 296504669, 510578774, 520649219, 640598279, 674992499, 713074004, 830453714, 947378984

    It can be noted that while the initial members all end in 9, the last three listed all end in 4. Even so the primes produced still end in 1 as 2 x 4 + 3 = 11 and 2 x 9 + 3 = 21 etc.. Take the final member listed, 947378984, as an example:
    • 2 x 947378984 + 3 = 1894757971 True
    • 4 x 947378984 + 5 = 3789515941 True
    • 6 x 947378984 + 7 = 5684273911 True
    • 8 x 947378984 + 9 = 7579031881 True
    • 10 x 947378984 + 11 = 9473789851 True
    • 12 x 947378984 + 13 = 11368547821 True
    • 14 x 947378984 + 15 = 13263305791 True
    • 16 x 947378984 + 17 = 15158063761 True
    • 18 x 947378984 + 19 = 17052821731 False
    There's no reason to suppose that there are not numbers out there that would extend the primes generated to \(18n+19\) and beyond. Using a Jupyter Notebook, a search to ten million produced nothing and, extending the search to one hundred million, the Notebook experienced a meltdown. So for the time being, 947378984 remains the largest member of the sequence and 256409 its smallest.

    ******************************************

    Another interesting property of 256409 is that it has no repeating digits and, of the members of OEIS A105657 listed previously, it is the only such number. All the other numbers have at least one repeating digit. This is not all that surprising given that the other numbers have eight and nine digits and so the probability of a repeating digit is high. Any six digit number such as 256409, if digits are assigned randomly, will have a smaller probability of digits repeating. 

    ******************************************

    256409 is a sphenic number which means that it has three distinct prime factors, in this case 43, 67 and 89. Now if the primes between 43 and 89 are listed, we see the following:

    43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89

    There are four primes between 43 and 67 and four primes also between 67 and 89. How often does this symmetry occur in sphenic numbers? We might ask it in the following way:
    If \(n\) is a sphenic number with factors \(p_1\), \(p_2\) and \(p_3\), what numbers have the property that their primes indices are in arithmetic progression?
    For example, the indices of 43, 67 and 89 are 14, 19 and 24 respectively and the latter three numbers are in arithmetic progression.

    Well, in the range up to one million, there are 206964 sphenic numbers, a little over 20%. In that range only 601 satisfy the previously mentioned criteria and as we have seen 256409 is one of them. If we specify that the common difference must be 5, then only 21 numbers satisfy and these are (permalink):

    806, 1887, 3895, 6923, 14993, 21359, 37111, 47519, 66263, 96773, 119939, 172457, 207583, 256409, 323689, 390769, 480083, 541741, 649967, 778231, 936371