Showing posts with label biprime. Show all posts
Showing posts with label biprime. Show all posts

Wednesday, 11 November 2026

Biprimes With 2 As A Factor

I noticed that the number 28346 associated with my diurnal age today had an interesting property when viewed as a very elongated rectangle:

  • 2D Surface Area: \(28346 = 2 \times 14173\)

  • 1D Edge Length: \(28350 = 2 \times 3^4 \times 5^2 \times 7\)

This is a difference of 4 and a percentage difference of \( \dfrac{4}{28346} \% \approx 0.01411133846  \%\)
.

Little did I know that the difference between the area and the perimeter is always 4 when 2 is one of the factors of a biprime. Starting with the first two biprimes 4 and 6 we notice that:

  • 2D Surface Area: \(4 = 2 \times 2\)

  • 1D Edge Length: \(8 = 2 \times 4\)

  • 2D Surface Area: \(6 = 2 \times 3\)

  • 1D Edge Length: \(10 = 2 \times 5\)

In general terms, we have every even biprime \(n = 2q\) with a constant difference of \( \vert{}2q - (2q + 4)\vert{} = 4\) between its area and perimeter. The percentage difference is:$$\frac{4}{2q} \times 100\% = \frac{200}{q}\%$$As \(q\) gets larger the percentage difference shrinks. Once  26678 is reached, the percentage difference is \(0.01499 \% \) which rounds to \( 0.01 \% \) (permalink).

Monday, 2 November 2026

Binary Display

I noticed that Numbers Aplenty had the display shown in Figure 1 as part of its output for the number associated with my diurnal age today (28337) with the comment that "when arranged in a rectangular grid, its binary digits exhibit some kind of symmetry". The binary digits are 110111010110001 and there are 15 of them so they can be arranged in a 5 x 3 grid.


Figure 1

I quite liked this output and decided to incorporate it into the program for my daily number analysis. The output is as shown in Figure 2.


Figure 2

Every day, from this day forwards, there will be a similar display and I can decide whether there is anything of interest regarding the display, symmetrical or otherwise. Figure 3 shows the results for 27334 where there is also lateral symmetry.


Figure 3

The range of numbers for which there are 15 binary digits is 16,384 to 32,767 corresponding to \(2^{14}\) and \(2^{15}-1\). Prior to 16384, there is a range of numbers with 14 binary digits that can also be arranged in a rectangular grid. This range is from 8192 to 16383 corresponding to \(2^{13}\) and \(2^{14}-1\). Figure 4 shows the display for 16382:


Figure 4

Above 32767, we enter the realm of 16 binary digits and no grid will be displayed. The output for 32768 would be:

Integer : 32768
Binary  : 1000000000000000
Length  : 16 binary digits

Result  : Bit length 16 (factorization: 2^4) is NOT a biprime. 

No grid generated.

Of course, a 4 x 4 or 8 x 2 grid could be generated with a tweak of the algorithm but I'll consider that as I approach 32768 by which point I'll be 89 years old.

Tuesday, 29 September 2026

Geometric Interpretation of Tetraprimes

Following on from my previous post titled Tetraprimes, I asked Gemini the following:

I’d like you to create a program in SageMath that will accept any positive integer with up to four not necessarily distinct prime factors as INPUT and if the integer has FOUR prime factors it should return 4D Hypervolume, 3D Surface Volume, 2D Total Face Area and 1D Total Edge Length. If it has THREE factors then 3D Volume, 2D Surface Area and 1D Edge Length are returned. If it has TWO factors then 2D Surface Area and 1D Edge Length are returned. If the input is prime or has more than four factors then this is stated and no output is returned. The factorisation of the numbers shown in the output should also be displayed.

Here is a permalink to the program that it created using 28302 as input. The output looks of the program is shown below:

Input: 28302
4D Hypervolume: 28302 = 2 * 3 * 53 * 89
3D Surface Volume: 48874 = 2 * 7 * 3491
2D Total Face Area: 21732 = 2^2 * 3 * 1811
1D Total Edge Length: 1176 = 2^3 * 3 * 7^2

The program also deals with triprimes and biprimes. Here is the output using 28303 and 28299 as inputs.

Input: 28303
3D Volume: 28303 = 11 * 31 * 83
2D Surface Area: 7654 = 2 * 43 * 89
1D Edge Length: 500 = 2^2 * 5^3

Input: 28299
2D Surface Area: 28299 = 3 * 9433
1D Edge Length: 18872 = 2^3 * 7 * 337

I've incorporated this algorithm into my daily number analysis. 


In the example shown above, we can see easily that 28303 can be interpreted as the volume of a rectangular prism with a surface area that is also a sphenic number and thus interpretable as the volume of another rectangular prism. This additional information for my daily number analysis will prove useful in other ways I'm sure.

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

Thursday, 10 September 2026

Semiprime Partitions of Semiprimes

The number associated with my diurnal age today, \( \textbf{28284} \), has a property that grants it membership in OEIS A338902:


A338902: number of integer partitions of the n-th semiprime into semiprimes.

I got Gemini to write a program to find the number of suitable partitions for integers from 1 to 50 displaying the results as both a table and a list (permalink):

Semiprime | Partitions
-----------------------
4         | 1
6         | 1
9         | 1
10        | 2
14        | 3
15        | 2
21        | 4
22        | 7
25        | 7
26        | 10
33        | 17
34        | 25
35        | 21
38        | 34
39        | 34
46        | 73
49        | 87
51        | 103
55        | 149
57        | 176
58        | 206
62        | 281
65        | 344
69        | 479
74        | 725
77        | 881
82        | 1311
85        | 1597
86        | 1742
87        | 1841
91        | 2445
93        | 2808
94        | 3052
95        | 3222
106       | 6784
111       | 9298
115       | 11989
118       | 14533
119       | 15384
121       | 17414
122       | 18581
123       | 19680
129       | 28284
133       | 35862
134       | 38125
141       | 57095
142       | 60582
143       | 64010
145       | 71730
146       | 76016

1, 1, 1, 2, 3, 2, 4, 7, 7, 10, 17, 25, 21, 34, 34, 73, 87, 103, 149, 176, 206, 281, 344, 479, 725, 881, 1311, 1597, 1742, 1841, 2445, 2808, 3052, 3222, 6784, 9298, 11989, 14533, 15384, 17414, 18581, 19680, 28284, 35862, 38125, 57095, 60582, 64010, 71730, 76016

As can be seen, the integer \( \textbf{43} \) has \( \textbf{28284} \) partitions compared to its 63261 unrestricted partitions.

Similar results could be created for primes and triprimes. Here are the result for the primes (permalink). The numbers form OEIS A056768.

Prime   | Partitions
---------------------
2       | 1
3       | 1
5       | 2
7       | 3
11      | 6
13      | 9
17      | 17
19      | 23
23      | 40
29      | 87
31      | 111
37      | 219
41      | 336
43      | 413
47      | 614
53      | 1083
59      | 1850
61      | 2198
67      | 3630
71      | 5007
73      | 5861
79      | 9282
83      | 12488
89      | 19232
97      | 33439
101     | 43709
103     | 49871
107     | 64671
109     | 73506
113     | 94625
127     | 221265
131     | 279516
137     | 394170
139     | 441250
149     | 766262
151     | 853692
157     | 1175344
163     | 1608014
167     | 1975108
173     | 2675925
179     | 3605666
181     | 3977861
191     | 6447003
193     | 7089299
197     | 8559069
199     | 9397474
211     | 16298212
223     | 27810910
227     | 33121140
229     | 36123177

1, 1, 2, 3, 6, 9, 17, 23, 40, 87, 111, 219, 336, 413, 614, 1083, 1850, 2198, 3630, 5007, 5861, 9282, 12488, 19232, 33439, 43709, 49871, 64671, 73506, 94625, 221265, 279516, 394170, 441250, 766262, 853692, 1175344, 1608014, 1975108, 2675925, 3605666, 3977861, 6447003, 7089299, 8559069, 9397474, 16298212, 27810910, 33121140, 36123177

Here are the result for the triprimes (permalink). 

Triprime  | Partitions
-----------------------
8         | 1
12        | 1
18        | 1
20        | 2
27        | 1
28        | 3
30        | 2
42        | 4
44        | 7
45        | 2
50        | 7
52        | 10
63        | 7
66        | 18
68        | 25
70        | 22
75        | 13
76        | 34
78        | 36
92        | 78
98        | 97
99        | 47
102       | 117
105       | 60
110       | 170
114       | 202
116       | 230
117       | 111
124       | 316
125       | 165
130       | 401
138       | 579
147       | 478
148       | 866
153       | 616
154       | 1086
164       | 1652
165       | 1040
170       | 2076
171       | 1350
172       | 2227
174       | 2418
175       | 1566
182       | 3271
186       | 3802
188       | 4115
190       | 4372
195       | 3587
207       | 5708
212       | 9783

1, 1, 1, 2, 1, 3, 2, 4, 7, 2, 7, 10, 7, 18, 25, 22, 13, 34, 36, 78, 97, 47, 117, 60, 170, 202, 230, 111, 316, 165, 401, 579, 478, 866, 616, 1086, 1652, 1040, 2076, 1350, 2227, 2418, 1566, 3271, 3802, 4115, 4372, 3587, 5708, 9783, 13878, 18291, 13983, 22465, 23913, 27489, 29296, 23092, 31441, 32846 (these are first 60 terms).

These results are base-independent and in general what is being done here is to take an integer with a certain property (primeness for example) and express it as a sum of smaller numbers with the same property. The numbere of ways in which this can be done is being counted. Here are some examples:

  • 129 = 4 + 4 + 4 + 6 + 111 ... there are 28284 ways in which this can be done
  • 97 = 3 + 5 + 89 ... there are 33439 ways in which this can be done
  • 212 = 8 + 12 + 18 + 174 ... there are 9783 ways in which this can be done

Sunday, 30 August 2026

Biprime and Triprime Chains

I noticed that the number 28273 has an interesting property. It is a triprime but its prime factors, when concatenated in ascending order, also form a triprime. The process can be repeated one more time. See the table below (permalink):

Step |          Number | Factorization
--------------------------------------------------
    1 |           28273 | 7^2 * 577
    2 |           77577 | 3 * 19 * 1361
    3 |         3191361 | 3 * 37 * 28751

This got me thinking about what numbers lead to record chains. I put Gemini to work and this is what it came up with in the range up to one million (permalink):

    Number |    Chain Length
----------------------------
         8 |               3
        44 |               5
      7685 |               8
     15831 |               9
    261291 |              10
    768932 |              11

As can be seen:
  • a chain of length 3 is reached before  there is a chain of length 2
  • a chain of length 5 is reached before there is chain of length 4
  • a chain of length 8 is reached before a chain of 6 or 7.

Let's examine 15831 from the above list and see what it's chain looks like (permalink).

Step |          Number | Factorization
--------------------------------------------------
    1 |           15831 | 3^2 * 1759
    2 |          331759 | 19^2 * 919
    3 |         1919919 | 3 * 59 * 10847
    4 |        35910847 | 7 * 103 * 49807
    5 |       710349807 | 3 * 271 * 873739
    6 |      3271873739 | 19 * 191 * 901591
    7 |     19191901591 | 37 * 701 * 739943
    8 |     37701739943 | 7 * 73 * 73780313
    9 |     77373780313 | 19 * 487 * 8362021

The same thing can be done for biprimes. The record lengths up to one million are as shown:

    Number |    Chain Length
----------------------------
         4 |               2
        10 |               4
       161 |               6
      1126 |               7
      1253 |               9
    100462 |              11

As can be seen:
  • a chain of length 4 is reached before a chain of length 3
  • a chain of length 6 is reached before there is a chain of length 5
  • a chain of length 9 is reached before there is a chain of length 8
  • a chain of length 11 is reached before there is a chain of length10

Let's examine 1253 from the above table.

 Step |          Number | Factorization
--------------------------------------------------
    1 |            1253 | 7 * 179
    2 |            7179 | 3 * 2393
    3 |           32393 | 29 * 1117
    4 |          291117 | 3 * 97039
    5 |          397039 | 29 * 13691
    6 |         2913691 | 11 * 264881
    7 |        11264881 | 1231 * 9151
    8 |        12319151 | 13 * 947627
    9 |        13947627 | 3 * 4649209

I've incorporated this analysis of biprimes and triprimes into my daily number analysis. Note that the biprimes can be square numbers e.g. \(49=7^2\) and the triprimes can contain repeated factors or even be cubic numbers e.g. \(44 = 2^2 \times 11\) or \(27 = 3^3\). Biprimes with no repeated factors are referred to as square-free biprimes while triprimes with no repeated factors are referred to as sphenic numbers.

There's room for extra investigation of course. I've only considered concatenation of prime factors in ascending order. Concatenations in any order could be considered. I've also only listed the record breakers as they first appear. For example, with the triprimes a chain of length 3 is reached by the number 8 before a chain of length 2 is reached. Thus I could consider what numbers first reach a given length. I'll consider these options in a future post.

Friday, 28 August 2026

Inserting Digits

28269 is a composite number with the interesting property that if we insert the digit 7 in any position, the result is a prime number. Thus 728269, 278269, 287269, 282769, 282679 and 282697 are all prime. Such numbers belong to OEIS A216168 (permalink):


A216168: composite numbers and 1 which yield a prime whenever a 7 is inserted anywhere in them, including at the beginning or end.

Up to 40000, the members of the sequence are:

1, 9, 27, 33, 39, 57, 87, 159, 177, 187, 603, 717, 753, 949, 1257, 1707, 2277, 2367, 4317, 4623, 4779, 4797, 5773, 6757, 6777, 7017, 7471, 7479, 7747, 7797, 7813, 7977, 8797, 9777, 9987, 10777, 11757, 17679, 28269, 28437, 29779, 34177, 34771

There is an associated OEIS sequence for inserting the digit 1. It is OEIS A216165 (permalink):


A216165: composite numbers and 1 which yield a prime whenever a 1 is inserted anywhere in them, including at the beginning or end.

The initial members of this sequence are:

1, 49, 63, 81, 91, 99, 117, 123, 213, 231, 279, 319, 427, 459, 621, 697, 721, 801, 951, 987, 1113, 1131, 1261, 1821, 1939, 2101, 2149, 2211, 2517, 2611, 3151, 3219, 4011, 4411, 4887, 5031, 5361, 6231, 6487, 7011, 7209, 8671, 9141, 9801, 10051, 10161, 10281, 10603, 10921, 11121, 11127, 11211, 11641, 11767, 11791, 11869, 12997, 13111, 13143, 14311, 16911, 17023, 17541, 18081, 18619, 19677, 21039, 21711, 23289, 25197, 29169, 29971, 31111, 34777, 38559

Here is the associated OEIS A216166 sequence for inserting a 3 (permalink).


A216166: composite numbers and 1 which yield a prime whenever a 3 is inserted anywhere in them (including at the beginning or end).

The initial members of this sequence are:

1, 121, 343, 361, 533, 637, 793, 889, 943, 1183, 3013, 3223, 3353, 3403, 3757, 3827, 3893, 4313, 4543, 4963, 8653, 10423, 14257, 20339, 23083, 23419, 30917, 33031, 33101, 33323, 33433, 33701, 33821, 34333, 34393, 35453, 36437, 36533, 39137, 39247

Here is the result for inserting the digit 9. I wasn't able to locate the OEIS sequence (permalink).

91, 209, 539, 749, 923, 931, 1079, 1139, 2717, 2959, 3971, 3979, 4559, 5629, 6401, 6739, 8213, 8491, 8939, 9607, 11089, 11227, 13943, 14269, 14371, 17381, 17689, 24059, 25517, 25937, 25949, 29087, 29197, 29419, 30989, 31691

There are various variations on this theme. Once can look at numbers, both composite and prime, or one can look at only primes. The insertion can be between digits but not at the beginning and end. The insertion can be only at the beginning and end etc. Let's consider one of these: OEIS A216167.


A216167: composite numbers which yield a prime whenever a 5 is inserted anywhere in them, excluding at the end.


Here are the initial members of the sequence:

9, 21, 57, 63, 69, 77, 87, 93, 153, 231, 381, 407, 413, 417, 501, 531, 581, 651, 669, 741, 749, 783, 791, 987, 1241, 1551, 1797, 1971, 2189, 2981, 3381, 3419, 3591, 3951, 4083, 4503, 4833, 4949, 4959, 5049, 5117, 5201, 5229, 5243, 5529, 5547, 5603, 5691, 5697, 50 6957, 7329, 7389, 7557, 8451, 8711, 9561, 9617, 11337, 11631, 13511, 13533, 15153, 17991, 19539, 23553, 25869, 27053, 30093, 31551, 32249, 32951, 36441, 38159

This approach could be extended to biprimes. For example, one could ask what biprimes (or semiprimes) remain biprimes when the digit 1 is inserted anywhere in the number, including its beginning and end? Using Gemini, here are results that were generated:

Biprimes up to 40000 maintaining the property upon digit insertion (permalink):

Digit 0:

None found in this range.

Digit 1:

[34, 55, 77, 85, 87, 111, 119, 121, 141, 219, 415, 417, 514, 537, 591, 689, 713, 717, 718, 731, 781, 835, 841, 921, 1111, 1114, 1138, 1227, 1293, 1357, 1391, 1591, 1643, 1671, 1761, 1851, 1915, 2171, 2181, 2533, 2623, 2631, 3207, 3561, 3579, 3811, 4119, 4171, 4267, 4353, 5223, 5311, 5321, 5353, 6157, 6181, 6429, 6621, 6697, 7087, 7113, 7131, 7251, 7311, 7513, 7531, 7571, 7897, 8201, 8254, 8511, 8659, 9111, 9123, 9167, 9247, 9271, 9487, 9651, 10147, 10217, 10401, 10417, 10699, 10743, 10765, 11013, 11101, 11107, 11391, 11479, 11513, 11787, 11819, 11899, 12219, 12381, 12399, 12709, 12718, 12751, 12773, 14109, 14119, 14527, 14711, 14727, 15261, 15711, 16213, 16251, 16489, 16621, 16751, 16801, 16917, 17151, 17461, 17527, 17601, 17677, 18091, 18519, 18591, 19111, 19117, 19711, 19729, 19741, 19858, 19959, 20311, 21103, 21461, 21829, 22601, 23811, 24159, 24161, 25331, 26283, 26521, 26869, 27087, 27831, 28009, 29487, 30061, 30157, 30499, 31273, 31587, 32521, 32599, 33193, 33953, 34051, 34567, 34663, 35941, 36331, 36631, 37081, 37461, 37891, 38067, 38623, 39478, 39793]

Digit 2:

[6, 26, 62, 206, 302, 1202, 1226, 1262, 2966, 12242, 26762, 32282, 36422]

Digit 3:

[9, 14, 39, 55, 58, 93, 94, 133, 235, 274, 291, 305, 309, 314, 365, 403, 453, 554, 649, 713, 763, 1067, 1133, 1157, 1385, 1589, 1631, 1961, 1969, 2073, 2174, 2231, 2419, 2483, 2723, 2811, 2867, 3035, 3043, 3134, 3239, 3351, 3443, 3455, 3518, 3595, 3974, 3991, 4315, 4387, 4478, 5057, 5249, 5545, 5761, 6071, 6233, 6431, 6731, 6807, 6817, 6893, 6953, 7033, 7067, 7403, 7543, 7903, 8141, 8359, 8438, 8473, 8483, 8495, 8683, 9395, 9713, 9731, 9838, 9943, 10609, 10897, 11107, 11179, 13483, 13531, 13953, 14131, 14473, 14515, 14809, 15163, 15397, 15833, 16049, 16331, 17113, 17281, 17311, 17521, 17767, 18613, 18721, 19331, 19651, 19693, 20191, 20831, 21541, 22121, 22163, 22733, 23107, 23237, 23303, 23503, 23533, 24173, 24283, 24797, 25129, 25843, 26173, 26545, 27389, 27833, 28399, 29903, 30353, 30445, 30779, 30973, 31187, 31309, 31463, 31757, 31861, 32023, 32231, 32293, 32483, 32539, 32723, 32861, 33017, 33134, 33163, 33193, 33238, 33307, 33313, 33314, 33373, 33407, 33443, 33643, 33689, 33833, 33881, 33951, 33953, 33977, 33979, 34003, 34201, 34249, 34633, 34837, 34885, 35063, 35303, 35723, 35887, 36283, 36289, 36893, 37033, 37333, 37351, 37391, 37733, 38057, 38939, 39449, 39497, 39513, 39793]

Digit 4:

[9, 69, 93, 115, 319, 321, 381, 427, 471, 489, 511, 529, 535, 559, 1101, 1383, 1441, 1623, 1909, 2173, 2319, 2361, 2761, 2881, 3409, 3817, 4009, 4141, 4413, 4479, 4749, 5029, 5143, 5299, 5455, 5611, 6249, 6313, 6331, 6423, 6459, 6541, 7063, 7423, 8097, 8403, 8797, 9313, 11029, 11787, 11881, 12063, 13051, 13389, 13449, 13641, 14187, 14473, 14493, 15529, 18247, 21427, 23611, 24643, 25351, 26409, 26457, 26989, 27157, 28761, 30531, 31609, 31987, 34627, 35493, 35713, 36019]

Digit 5:

[15, 35, 51, 65, 155, 219, 299, 411, 515, 545, 554, 713, 755, 771, 818, 893, 905, 965, 993, 1055, 1469, 2651, 3005, 3065, 3953, 4313, 4359, 4811, 5033, 5069, 5123, 5129, 5345, 5429, 5513, 5543, 5585, 5891, 6218, 7053, 8051, 8301, 8553, 8945, 9155, 9543, 10109, 10749, 16535, 16595, 16955, 17529, 17555, 18653, 19451, 21449, 23255, 24263, 25061, 25131, 25293, 25751, 27831, 28529, 30993, 31539, 33551, 33933, 34559, 35411, 35681, 35693, 35921]

Digit 6:

[22, 62, 122, 662, 746, 2066, 17522, 38062]

Digit 7:

[377, 471, 721, 737, 778, 799, 849, 961, 1057, 1267, 1273, 1639, 1651, 1717, 2041, 2257, 2458, 2841, 3099, 3763, 3977, 3981, 4083, 4247, 4281, 4467, 4577, 4757, 5497, 6009, 6087, 6127, 6267, 6297, 6341, 6729, 6787, 7117, 7313, 7739, 7921, 7971, 8063, 8097, 8457, 8749, 8907, 9057, 9313, 9469, 9897, 9899, 10381, 10617, 11013, 11107, 11217, 11283, 12273, 13017, 13749, 14277, 14757, 15529, 16147, 16957, 17071, 17179, 17439, 17503, 17517, 17637, 17701, 17773, 17781, 17809, 18283, 19039, 19857, 21477, 21741, 23731, 24537, 27147, 27433, 27769, 28263, 28999, 29163, 29229, 30007, 30127, 30721, 31753, 31879, 32259, 32937, 33163, 33897, 34467, 35881, 37381, 37803, 37837]

Digit 8:

[15, 69, 95, 119, 213, 341, 843, 1337, 2481, 2831, 3057, 3161, 3489, 3513, 3587, 3849, 4803, 5489, 5663, 6189, 6459, 6893, 7113, 7355, 7379, 7409, 8057, 8141, 8187, 8189, 8279, 8331, 8399, 8567, 8751, 8889, 8981, 9881, 10119, 11009, 11381, 11477, 12171, 12531, 14109, 16721, 17517, 18087, 18227, 18663, 18809, 20669, 20783, 22467, 23597, 26081, 28299, 28511, 28739, 28781, 28887, 29321, 29891, 30209, 32393, 33881, 34409, 36321, 37581, 38217]

Digit 9:

[4, 21, 33, 51, 74, 93, 95, 115, 119, 183, 235, 247, 259, 481, 589, 799, 813, 914, 917, 959, 979, 989, 993, 995, 998, 1067, 1101, 1165, 1174, 1589, 1799, 1829, 1849, 2098, 2249, 2257, 2509, 2654, 2839, 2923, 2977, 3029, 3099, 3421, 3781, 3959, 4097, 4319, 4699, 4859, 4897, 5065, 5137, 5293, 5909, 5993, 6049, 6107, 6898, 7837, 7921, 8314, 8359, 8489, 8593, 8921, 9094, 9299, 9329, 9335, 9353, 9509, 9569, 9599, 9691, 9763, 9865, 9959, 9977, 10189, 10489, 10511, 10999, 12139, 12199, 13989, 14311, 14599, 14761, 15011, 15409, 15449, 15829, 16013, 16357, 16969, 17131, 17149, 17177, 17663, 18293, 18383, 18991, 19099, 19187, 19307, 19369, 19493, 19579, 19658, 19667, 19879, 19907, 19959, 20093, 20131, 20765, 21469, 22387, 22597, 22927, 22991, 23299, 24839, 24901, 25003, 25401, 25807, 25927, 26291, 26447, 27667, 27723, 27859, 27877, 28877, 28939, 28981, 28997, 29227, 29321, 29878, 30679, 30767, 30799, 30997, 31909, 32961, 34309, 35215, 35269, 35833, 35939, 36289, 36989, 37249, 38093, 38159, 38641, 39289, 39797]

Let's test for 28299 which is listed under the digit 8 where we find that:
  • \(28299 = 3 \times 9433\)
  • \(828299 = 23 \times 36013\)
  • \(288299 = 11 \times 26209\)
  • \(282899 = 79 \times 3581\)
  • \(282989 = 7 \times 40427\)
  • \(282998 = 2 \times 141499\)
Here the results for sphenic numbers (permalink):

Digit 0:

None found in this range.

Digit 1:

[1595, 3245, 5258, 5710, 7015, 7718, 8255, 8395, 9185, 9878, 9915, 11018, 11194, 16511, 17005, 18518, 18758, 18778, 19245, 27911, 30354, 31665, 33115, 33514, 37614, 38129, 39179]

Digit 2:

[222, 282, 1742, 2222, 2586, 2782, 2922, 3286, 3342, 3926, 4342, 4362, 4722, 5066, 5246, 5262, 7582, 7622, 7782, 8706, 9726, 10622, 10642, 11822, 13782, 14126, 15026, 15422, 16402, 16682, 17122, 20802, 21566, 21962, 22026, 22202, 22782, 23026, 25782, 26942, 27122, 27282, 27726, 29926, 30522, 31002, 31922, 32426, 33242, 34302, 34922, 36182, 37022, 38222, 39422, 39482]

Digit 3:

[615, 1245, 1533, 2198, 2289, 2739, 3333, 3355, 3358, 3590, 5034, 5558, 5734, 6730, 7761, 8238, 8931, 9254, 12189, 12207, 12215, 12595, 13334, 15035, 15897, 15933, 16833, 17733, 18381, 18578, 18579, 18867, 20194, 20894, 23834, 24447, 25534, 28634, 28821, 30385, 30747, 30981, 31190, 32349, 32354, 32774, 33303, 33321, 33835, 33843, 33998, 35734, 37205, 37505, 37558, 38001, 38165, 38973, 39058, 39819, 39934]

Digit 4:

[345, 665, 1547, 1955, 2895, 4585, 4695, 5595, 6645, 7545, 7885, 8729, 9465, 9485, 9515, 9685, 9911, 9915, 10885, 12265, 14465, 19245, 19495, 22555, 25991, 26381, 26745, 29087, 32035, 32145, 32155, 35405]

Digit 5:

[385, 555, 595, 705, 1085, 1455, 2085, 2355, 2555, 2685, 2865, 3355, 3558, 3565, 3585, 4345, 4355, 4565, 4605, 5258, 5405, 5495, 5555, 5835, 5898, 6135, 6785, 6955, 6978, 7554, 7955, 8355, 8533, 9678, 10585, 11473, 12174, 12395, 13115, 13574, 14795, 15535, 17515, 17895, 19598, 20855, 20881, 21765, 21954, 23165, 25085, 25334, 25543, 25858, 26114, 26115, 26555, 26765, 28145, 28754, 29235, 30594, 30635, 30965, 32415, 33155, 33485, 34655, 35315, 35655, 35893, 36515, 36555, 37465, 37565, 37655, 38185, 38558, 39589, 39785, 39885, 39895]

Digit 6:

[186, 266, 582, 806, 906, 1266, 2266, 3562, 3606, 4462, 4966, 5486, 5622, 6086, 6386, 6886, 7966, 9266, 10366, 10586, 13166, 14162, 14806, 16702, 17366, 21626, 22526, 23246, 23446, 26966, 27062, 28262, 31666, 32662, 34226, 34622, 37226, 39742]

Digit 7:

[777, 4330, 4697, 4938, 5678, 5757, 7287, 7777, 7798, 8378, 8898, 9258, 17798, 19877, 23009, 25277, 29530, 29798, 30797, 32514, 36707, 36743, 37077]

Digit 8:

[2185, 2795, 2821, 6335, 8195, 8215, 8255, 8355, 8905, 9285, 10165, 11615, 14885, 18241, 18885, 26315, 30965, 31027, 34177]

Digit 9:

[399, 915, 1515, 2595, 2877, 2937, 2955, 2985, 3201, 3399, 3598, 3945, 4767, 5019, 5133, 5709, 6141, 6693, 7257, 7918, 8697, 8798, 9291, 9398, 9545, 9717, 10090, 10923, 14755, 15171, 15794, 18699, 19495, 19833, 19839, 19869, 19970, 20694, 21754, 21957, 22258, 22989, 23691, 24477, 25203, 25809, 27219, 29289, 29578, 30018, 32165, 34869, 35457, 36879, 39158, 39185]

Let's test for 28262 which is listed under the digit 6:
  • \(28262 = 2 \times 13 \times 1087 \)
  • \(628262 = 2 \times 53 \times 5927 \)
  • \(268262 = 2 \times 113 \times 1187 \)
  • \(286262 = 2 \times 41 \times3491 \)
  • \(282662 = 2 \times 79 \times 1789 \)
  • \(282626 = 2 \times251 \times 563 \)

Wednesday, 1 July 2026

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 

Sunday, 21 June 2026

Numbers Within Numbers

Let's formalise the concept of internal digits. Take a number like 28211. It's prime but if we remove the leftmost digits (2) and the rightmost digit (1), we are left with the number 821. This is the number within a number and it happens to be prime also. It is thus a member of OEIS A069686:


 A069686: primes whose internal digits form a prime.

The members of this sequence from 28000 to 40000 are (permalink):

28097, 28099, 28111, 28211, 28219, 28277, 28279, 28297, 28393, 28537, 28571, 28573, 28579, 28591, 28597, 28631, 28771, 28813, 28817, 28837, 28871, 28879, 29077, 29191, 29297, 29411, 29473, 29531, 29537, 29671, 29717, 29833, 29837, 29917, 30029, 30059, 30071, 30113, 30119, 30133, 30137, 30139, 30197, 30293, 30313, 30319, 30431, 30539, 30593, 30671, 30677, 30713, 30839, 30893, 30971, 30977, 31013, 31019, 31033, 31039, 31079, 31091, 31139, 31271, 31277, 31319, 31379, 31391, 31393, 31397, 31511, 31513, 31517, 31573, 31793, 31799, 31817, 31973, 31991, 32117, 32119, 32233, 32237, 32297, 32299, 32411, 32413, 32573, 32579, 32633, 32693, 32713, 32717, 32719, 32771, 32779, 32831, 32833, 32839, 32933, 32939, 33071, 33073, 33113, 33119, 33179, 33311, 33317, 33377, 33479, 33493, 33533, 33599, 33679, 33739, 33791, 33797, 33893, 34019, 34211, 34213, 34217, 34313, 34319, 34337, 34439, 34499, 34613, 34631, 34673, 34679, 34871, 34877, 34913, 34919, 35099, 35419, 35573, 35771, 35879, 35933, 35993, 35999, 36011, 36013, 36017, 36073, 36131, 36137, 36191, 36313, 36319, 36433, 36473, 36479, 36599, 36739, 36779, 36833, 36913, 36919, 37013, 37019, 37097, 37199, 37273, 37277, 37337, 37339, 37397, 37511, 37517, 37571, 37573, 37579, 37619, 37691, 37693, 37699, 37871, 37879, 38113, 38119, 38219, 38231, 38237, 38239, 38273, 38299, 38393, 38593, 38639, 38833, 38839, 38873, 39079, 39113, 39119, 39191, 39199, 39293, 39371, 39373, 39419, 39671, 39679, 39719, 39779, 39839, 39971, 39979

We can modify the algorithm to search for square numbers within square numbers. For example, \(144 = 12^2\) and its internal digit \(4 = 2^2\) and so it is a member of OEIS A069701:


 A069701: squares with internal digits also forming a square > 0.


The members up to 40000 are few and far between: 

144, 196, 441, 841, 1369, 3364, 4096, 5041, 8649, 10816, 11449, 20164, 38416.

So the takeaway from this is that every \(n\) digit number has an (\(n-2\)) digit number inside of it provided \(n>2\) and sequences can be developed by relating this internal number to the larger number of which it forms a part.

Let's consider numbers that are biprime and whose internal digits also form a biprime. Take 28189 as an example:$$ \begin{align} 28189 &= 7 \times 4027 \\ 818 &= 2 \times 409 \end{align}$$These sorts of numbers are not listed in the OEIS. 

Similarly for triprimes. Take 28055 as an example:$$ \begin{align} 28055 &= 5 \times 31 \times  181\\805 &= 5 \times 7 \times 23 \end{align}$$Of course we could consider numbers within numbers within numbers etc. but given that I'm mainly examining five digit numbers less than 40000, I'll leave off at numbers within numbers. Of course, these relationships between numbers and their respective internal numbers only apply with certainty in the number base under consideration (base 10 so far in this post). Take our earlier example of 28211 and its internal number of 821. Both are prime. Let's change to base 9:$$ \begin{align} 28211_{10} &= 42625_9 \rightarrow 265_9 \text{ as its internal number} \\ 265_9 &= 218_{10} \text{ which is clearly not prime} \end{align} $$Primeness is base independent and if a number is not prime in a certain base then it is not prime in any base. However, the inner number while not prime in base 10 may be prime if regarded as a number in another base. Let's illustrate this with 28019. It is a prime in base 10 where the inner number, 801, is divisible by 3. However, we can note the following:$$ \begin{align} 801_{12} &= 1153_{10} \text{ which is prime}\\801_{15} &= 1801_{10} \text{ which is prime} \end{align} $$I've incorporated the search for the following types of numbers into my number analysis algorithm so that the following types of numbers can be identified:
  • prime number whose internal number is also prime in any base from 2 to 16
  • biprime number whose internal number is also prime using base 10 only
  • triprime number whose internal number is also triprime using base 10 only
  • square number whose internal number is also square using base 10 only

Thursday, 13 November 2025

Claude to the Rescue

The number 27983, associated with my diurnal age today, has a property than confers it membership in OEIS A335752: the lexicographically earliest sequence of primes, each two of which sum to a triprime. The sequence begins: 3, 5, 47, 239, 3023, 27983, 53231, ... so let's confirm that these numbers satisfy using 3 as a starting point:
  • \(3 + 5 = 8 =2^3\)
  • \(3 + 47 = 50 = 2 \times 5^2\)
  • \(3 + 239 = 242 = 2 \times 11^2 \)
  • \(3 + 3023 = 3026 = 2 \times 17 \times 89 \)
  • \(3+27983 = 27986 = 2 \times 7 \times 1999\)


The sums above are all triprimes and we will find that any number in the list paired with any other number will produce a triprime. The code for this was included in the OEIS comments but was in Mathematica. I got Gemini to convert it to Python code and then Grok but in both cases the primeomega function was misunderstood with both claiming that primeomega(12) =2 and not 3. 

I didn't fully understand the Python code and was looking to Gemini and then Grok to explain it to me. It was only Claude that succeeded to my satisfaction. Here is the code followed by Claude's explanation. I think Claude will be my go to resource for anything to do with coding.

from sympy import nextprime, primeomega
ps = [3]
for _ in range(10):
    p = nextprime(ps[-1]) 
    while not all(primeomega(x + p) == 3 for x in ps):
        p = nextprime(p)
    ps.append(p)
print(ps)

I'd be happy to explain this code line by line! This code generates a sequence of prime numbers with a special property.

Code Breakdown

from sympy import nextprime, primeomega

Imports two functions from SymPy:
  • nextprime(\(n\)): Returns the next prime number greater than \(n\)
  • primeomega(\(n\)): Returns the total number of prime factors of \(n\) (counting multiplicity). For example, primeomega(12) = 3 because 12 = 2² × 3 (two 2's and one 3)
ps = [3]

Initializes the sequence with the first prime number 3. This list will store our special sequence of primes.

for _ in range(10):

Loops 10 times to find 10 more primes (so we'll have 11 total including the initial 3). The underscore _ is used when we don't need the loop variable.

p = nextprime(ps[-1])

Gets the next prime after the last element in our list. 
  • ps[-1] accesses the last element of the list
  • Initially, this gives nextprime(3) = 5
  • This is our candidate prime to add to the sequence
while not all(primeomega(x + p) == 3 for x in ps):
    p = nextprime(p)

This is the key part! It checks if the candidate prime \(p\) satisfies a special condition:
  • For every number \(x\) already in our list ps
  • The sum \(x + p\) must have exactly 3 prime factors (counting multiplicity)
  • If this condition fails for any \(x\), we move to the next prime candidate
  • This continues until we find a prime where all sums have exactly 3 prime factors
ps.append(p)

Adds the qualified prime to our sequence once it passes the test.

print(ps)

Prints the final sequence** of primes.

Example Walkthrough

Let's trace the first iteration:
1. Start with ps = [3]
2. Try p = 5: Check if 3 + 5 = 8 = 2³ has 3 prime factors ✓ (yes, three 2's)
3. Add 5 to list: ps = [3, 5]
4. Try p = 7: Check 3 + 7 = 10 = 2 × 5 (only 2 factors) ✗
5. Try p = 11: Check 3 + 11 = 14 = 2 × 7 (only 2 factors) ✗
6. Continue until finding a prime that works with both 3 and 5...

This creates a sequence where each new prime maintains the property that when added to any previous prime in the sequence, the result always has exactly 3 prime factors!

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

Now if we change the condition to primeomega = 2, we get the following sequence: 3, 7, 19, 139, 859, 8179, 173059, ... where it can be seen there is a big jump from 8179 to 173059. Testing this out using 3 again we see that:
  • \(3+7=10=2 \times 5\)
  • \(3+19=22=2 \times 11\)
  • \(3+139=142=2 \times 71\)
  • \(3+859=862=2 \times 431\)
  • \(3+8179=8182=2 \times 4091\)
  • \(3+173059=173062=2 \times 86531\)
The sequence is included in the OEIS as A113875: slowest growing sequence of primes having the prime-pairwise-average property: if i<j, (a(i)+a(j))/2 is prime. This makes sense in that 2 seems to be the common factor is all of the sums. 

The sequence with additional (very large) terms looks like this:
3, 7, 19, 139, 859, 8179, 173059, 1026199, 1827139, 15828679, 13187242759, 18732483199, 912492556939, 9130567625119

When we set primeomega = 4 we get the following sequence: 3, 13, 137, 1193, 4373, 26017, 33889, 495433, ... which is NOT listed in the OEIS. Again let's use 3 as our test number:
  • \(3+13=16=2^4\)
  • \(3+137=140=2^2 \times 5 \times 7\)
  • \(3+1193=1196=2^2 \times 13 \times 23\)
  • \(3+4373=4376=2^3 \times 547\)
  • \(3+26017=26020=2^2 \times 5 \times 1301\)
  • \(3+33889=33892=2^2 \times 37 \times 229\)
  • \(3+495433=495436=2^2 \times 29 \times 4271\)
That's probably a good place to stop.

Tuesday, 23 September 2025

Obscure Difference of Two Squares

 Here's an interesting problem that appeared in this YouTube video:

Find the values of \(a, b \in \mathbb{N}\) such \(a^b-b=77\).

With two unknowns and only one equation, the problem seems daunting but the factorisation of 77 and the fact that the values of \(a\) and \(b\) are restricted to natural numbers will be enough to solve the problem. However, the solution that the video describes hinges on the use of a difference of two squares and this is not at all obvious. Let's begin:$$ \begin{align} a^b-b &= 77 \\ (a^{b/2})^2-(\sqrt{b})^2 &= 77 \\ (a^{b/2}-\sqrt{b}) \times  (a^{b/2}+\sqrt{b}) &= 7 \times 11 \end{align} $$We know that \(a^{b/2}-\sqrt{b} < a^{b/2}+\sqrt{b}\) and so there are only two possible factorisations of 77. These are \(1 \times 77\) and \(7 \times 11 \). Not only is the second option more likely but the first option in fact does not yield a solution, as we'll show later. Let's proceed using the \(7 \times 11\) factorisation.$$ \begin{align} a^{b/2}-\sqrt{b} &=7 \dots 1\\ a^{b/2}+\sqrt{b} &=11 \dots 2 \end{align}$$Adding equations 1 and 2 together gives:$$ \begin{align} 2 a^{b/2} &=18 \\ a^{b/2} &=9 \\ \end{align}$$Let's substitute \(a^{b/2}=9\) back in the equation 1:$$ \begin{align} 9 - \sqrt{b} &= 7 \\ \sqrt{b} &= 2 \\ b &=4 \\ \because a^{b/2} &= 9 \\ a^2 &= 9 \\ a&=3 \end{align}$$So we have a solution with \(a = 3\) and \(b=4\). Substituting these values back into the original equation should confirm the solution:$$ \begin{align} a^b -b &= 77 \\ 3^4-4 &=77\\77 &= 77 \end{align}$$But what of the \(1 \times 77\) factorisation? Let's confirm that this does not yield a solution:$$ \begin{align} a^{b/2}-\sqrt{b} &=1 \dots 1\\ a^{b/2}+\sqrt{b} &=77 \dots 2 \end{align}$$Adding equations 1 and 2 together gives$$ \begin{align} 2a^{b/2} &=78\\ a^{b/2} &= 39 \end{align}$$Substitute \(a^{b/2}=39\) back in the equation 1:$$ \begin{align} 39 - \sqrt{b} &=77 \\ \sqrt{b}=-38 \end{align}$$There is no value of \(b\) that satisfies this equation so we can confirm that the \(1 \times 77\) factorisation does not yield a solution. I did not think up the method of solution described here and all credit is due the author of the linked video. It did occur to me to generalise the problem and consider what other biprimes (or semiprimes) yield a solution. In other words, what prime values of \(x\) and \(y\), with \(x<y\), allow for natural number solutions to:$$a^b-b=xy$$The two equations we obtain from this relationship are:$$ \begin{align} a^{b/2}-\sqrt{b} &=x \dots 1\\ a^{b/2}+\sqrt{b} &=y \dots 2 \end{align}$$Adding equations 1 and 2 gives:$$ \begin{align} 2a^{b/2} &= x+y \\ a^{b/2} &= \frac{x+y}{2} \end{align}$$Substituting into equation 1 gives:$$ \begin{align} \frac{x+y}{2}-\sqrt{b} &= x \\ \sqrt{b} &= \frac{x+y}{2}-x \\ \sqrt{b} &= \frac{x+y-2x}{2} \\ b &= \frac{(y-x)^2}{4}  \end{align}$$Testing this equation with \(x=7\) and \(y=11\) we see that \(b=4\) and so all is well. So what other prime values of \(x\) and \(y\) will yield solutions? Testing we find that \(x=3\) and \(y=5\) yield a value of \(b=1\). This leads to:$$ \begin{align} a^{b/2} &=\frac{x+y}{2}\\ \sqrt{a} &= 4 \\ a &=16 \end{align}$$Checking, we see that:$$ \begin{align} a^b-b &=15 \\ 16^1-1 &=15\\15 &= 15 \end{align}$$Rather than randomly checking prime values of \(x\) and \(y\), the design of a search algorithm is a more organised approach (permalink). Let's exclude those cases where either \(a=1\) or \(b=1\) as these are rather trivial. For semiprimes with prime factors less than 300, I found the following additional semiprimes (the calculations are very processor intenstive). The first is 6557:$$ \begin{align} 6557 &=79 \times 83 \\ \text{with } a &= 9 \text{ and }b= 4 \end{align}$$Checking, we find that:$$ \begin{align} a^b-b &= 6557 \\9^4 - 4 &= 6557 \\ 6561-4  &= 6557\\ 6557&=6557 \end{align}$$The second is 50621:$$ \begin{align} 50621 &=223 \times 227\\ \text{with } a &= 15 \text{ and }b= 4 \end{align}$$Checking, we find that:$$ \begin{align} a^b-b &= 50621 \\ 15^4 - 4 &= 50621\\50625-4 &= 50621\\50621 &= 50621 \end{align}$$The third is 194477:$$ \begin{align} 194477 &=439 \times 443 \\ \text{with } a &= 21 \text{ and } b=4 \end{align}$$Checking, we find that:$$ \begin{align} a^b-b &= 194477 \\ 21^4-4 &= 194477 \\ 194481-4 &= 194477 \\ 194477 &= 194477 \end{align}$$That's probably enough. As can be seen, the semiprimes that satisfy are few and far between but it was an interesting exercise. Notice that the prime factors in each case are adjacent primes.

Wednesday, 17 September 2025

Some Interesting Properties of 39

My daughter-in-law turned 39 yesterday and so I was prompted to investigate some of its mathematical properties. One of its properties is its membership in OEIS A055233:


A055233: composite numbers equal to the sum of the primes from their smallest prime factor to their largest prime factor.

The only members of this sequence in the range up to 40000 are 10, 39, 155 and 371. All are semiprimes and factorise as follows:

  • \(10 = 2 \times 5 \text{ with } 2 + 3 + 5 = 10 \)
  • \(39 = 3 \times 13 \text{ with } 3 + 5 + 7 + 11+13 = 39\)
  • \(155 = 5 \times 31 \text{ with } 5 + 7 + \ldots + 29 + 31=155\)
  • \(371 = 7 \times 53 \text{ with } 7 + 11 + \ldots + 47 + 53=371\)
Because they are semiprimes they are thus equal to the product of their smallest and largest prime factors. However, this is not the case for the next member of the sequence: 2935561623745. The reason is that it is not a semiprime.
  • \(2935561623745= 5 \times 19 \times 53 \times 61 \times 9557887\)

The next member of the sequence 454539357304421 is a semiprime and thus follows the pattern of the first four members of the sequence:
  • \(454539357304421 = 3536123 \times 128541727\)
So we see that 39 by virtue of its membership in OEIS A055233 is rather special. Of course, it has some other interesting qualities. For example, it can be constructed from the first three powers of 3:$$39=3+3^2+3^3$$Gemini also mentions the following number properties:
Beyond these patterns, 39 is also classified as a \( \textbf{Perrin number}\) and a \( \textbf{Størmer number}\), placing it within specialized mathematical sequences that are far from intuitive. 
The number also has an \( \textbf{aliquot sum}\) of 17, which is a prime number, a unique characteristic that links it to a specific aliquot sequence. 
In the realm of number partitions, 39 is notable as the smallest natural number to have three distinct partitions into three parts that all yield the same product, 1200. These partitions are:
  • {25, 8, 6} 
  • {24, 10, 5} 
  • {20, 15, 4}. 
Lastly, in analytic number theory, the \( \textbf{Mertens function}\) returns a value of 0 when given 39, a property that suggests a form of numerical equilibrium or stability, a concept that finds intriguing parallels in other domains. See blog post Zeroes of the Mertens Function.

39 is also what's termed a \( \textbf{perfect totient number} \) because the sum of its iterated totients equals the number itself. Let's confirm this:$$ \begin{align} \phi(39) &=24 \\ \phi(24) &=8 \\ \phi(8) &=4 \\ \phi(4) &=2 \\ \phi(2) &=1 \end{align} $$The sum of these iterated totients equals 39:$$24 + 8 + 4 + 2 + 1 =39$$The perfect totient numbers are listed in OEIS A082897 (permalink):

3, 9, 15, 27, 39, 81, 111, 183, 243, 255, 327, 363, 471, 729, 2187, 2199, 3063, 4359, 4375, 5571, 6561, 8751, 15723, 19683, 36759, 46791, 59049, 65535, 140103, 177147, 208191, 441027, 531441, 1594323, 4190263, 4782969, 9056583, 14348907, 43046721