Processing math: 100%

Friday, 21 March 2025

Composites, Prime Factors and Anagrams

Let's consider the prime factors of a composite number. The number associated with my diurnal age today is 27746 so let's take that. It's factorisation is as follows:27746=2×13873

The digits making up these factors can be sorted and listed as:digits of prime factors =[1,2,3,3,7,8]
Now the digits of the number itself can also be sorted and listed as:digits of number =[2,4,6,7,7]
Clearly the two lists are not the same but are there numbers where the two lists are the same? The answer is yes but up to 40,000, there are only four such numbers and they are 1255, 12955, 17482 and 25105 with the following factorisations:1255=5×25112955=5×259117482=2×874125105=5×5021
These numbers are the first four terms of OEIS 
A280928:


A280928   composite numbers having the same digits as their prime factors (with multiplicity), including zero digits.

The initial members of the sequence are (permalink):

1255, 12955, 17482, 25105, 100255, 101299, 105295, 107329, 117067, 124483, 127417, 129595, 132565, 145273, 146137, 149782, 163797, 174082, 174298, 174793, 174982, 250105, 256315, 263155, 295105, 297463, 307183, 325615, 371893, 536539, 687919, 1002955, 1004251, 1012099, 1025095, 1029955

What about composite numbers that have this property but in other bases? Let's consider base 12 for starters. We find that there are 15 numbers in base 10 that have this property when converted to base 12. They are (permalink):

185, 219, 2165, 2402, 3981, 10031, 21349, 21907, 22049, 24199, 27746, 28802, 29919, 31107, 37387

Notice that the number associated with my diurnal age today, 27746, makes an appearance because when we change to base 12 we have:2774610=1408212=212×804112

All of these numbers can be found in OEIS A260055 but there are some additional numbers like 169 because:16910=12112=11212
As can be seen, the exponent is included which I've not allowed.

What about other bases? Let's work our way down from base 10 to base 2 first. There are no numbers in base 9 but in base 8 there are ten terms (permalink):

85, 771, 4369, 4803, 5359, 6805, 7339, 19405, 24433, 36526

As an example, take 85 where we have:858=1258=5×218

In base 7, there is only one number in the range up to 40,000 (permalink), namely 30057. This is because:3005710=1534267=37×617×4527
In base 6, there are 45 terms and they are (permalink):

57, 314, 327, 377, 417, 1387, 1417, 1754, 1874, 1934, 1977, 2157, 2355, 2474, 2487, 2517, 2577, 2987, 5597, 8227, 10394, 10474, 10834, 11014, 11229, 11654, 11667, 12317, 12741, 13067, 13117, 13154, 13155, 13427, 14055, 14114, 14417, 14834, 14907, 15117, 15434, 15537, 15929, 15977, 30827

Let's take 57 as an example, where we have:5710=1337=37×317

There are no numbers in base 5. In base 4 there are 52 terms and they are (permalink):

1135, 1243, 1639, 2167, 4735, 4855, 4939, 5311, 6589, 7003, 7339, 8503, 16735, 17779, 17965, 18079, 18283, 18589, 18654, 18847, 18871, 18895, 18937, 19063, 19255, 20095, 20166, 22471, 22927, 23479, 23659, 24433, 25071, 25467, 26191, 26941, 27019, 27247, 27637, 28149, 28153, 29839, 30147, 31111, 32703, 32721, 33973, 34399, 35299, 36817, 38071, 38863

Let's take 1135 as an example where we have:113510=1012334=114×32034

In base 3, there are 23 terms and they are (permalink):

7847, 8414, 10927, 21299, 22589, 22838, 23294, 23807, 24451, 24458, 24962, 25018, 25214, 25991, 26174, 26201, 27671, 27881, 29141, 29882, 31073, 32389, 38617

Let's take 7847 as an example, where we have:784710=1012021223=213×2013×20123

For base 2, there are 430 terms so I won't list them here. Let's move up from base 10 to base 11 where there is a single term 18193 because (permalink)1819310=1273A11=711×2111×A311
Base 12 has been covered so let's move on to base 13 where there are no numbers and then on to base 14 where there are three terms (permalink):

4119, 16009, 39817

Let's take 4119 as an example where we have:411910=170314=314×70114

There are no terms in bases 15 and 16 and that is a good place to stop for now.

Saturday, 15 March 2025

Gapful Numbers Revisited

It was only recently (18th December 2024) that I made a post titled Gapful Numbers but today requires a second post about them because of the number associated with my diurnal age: 27740. This number marks the beginning of a run of three consecutive numbers with the properties that:

  • the number is gapful, meaning that the number formed by concatenating the first and last digits of the number, divides the numbers
  • the sum of the digits (SOD) of the number is also equal to the number formed by concatenating the first and last digits of the number
Thus we have:
  • 27740 20 which divides it evenly and is equal to its SOD
  • 27741  21 which divides it evenly and is equal to its SOD
  • 27742  22 which divides it evenly and is equal to its SOD
In the range up to 40000, there are five groups of such triplets and they are:

  • 10094,10095 and 10096
  • 12255, 12256 and 12257
  • 12256, 12257 and 12258
  • 15134, 15135 and 15136
  • 27740, 27741 and 27742
However, as can seen there is actually a run of four consecutive numbers in the above list, namely 12255, 12256, 12257 and 12258. While such runs of four are rare, they become more frequent if we only require the numbers to be gapful and not have the SODs equal to the concatenated first and last digits of the number. In the range up to 40000, the quadruplets are then (permalink):
  • 10932, 10933, 10934 and 10935
  • 11229, 11230, 11231 and 11232
  • 12255, 12256, 12257 and 12258
  • 15408, 15409, 15410 and 15411
  • 16392, 16393, 16394 and 16395
  • 17170, 17171, 17172 and 17173

Friday, 14 March 2025

Some Special Prime Chains

Question: what number begins the longest uninterrupted chain of primes that are either twin, cousin or sexy. In other words, the gap between successive primes must be 2, 4 or 6.

Answer: up to ten million the number that begins the longest uninterrupted chain of such primes is, perhaps not surprisingly, 3. The progression is 2, 2, 4, 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 6, 6, 2, 6, 4, 2, 6, 4, 6 and the final prime is 89 after which there is a gap of 8 to the next prime of 97. So between 3 and 89, a gap of 86, there are 23 primes including the first and last primes. It's unlikely that such a concentration of primes will ever occur again amongst the natural numbers but perhaps it's possible. The ratio of 86 to 23 can be expressed as:8623=3.¯7391304347826086956521

Thus the average distance between successive primes is slightly under 4 (permalink).

While it's unlikely that this run of 23 twin, cousin or sexy primes will ever be equalled or surpassed what about other runs from 97 upwards of these sorts of primes. A check up to ten million reveals the following record-breaking runs with the starting prime shown:

  • 97 with a run of 6 primes
  • 149 with a run of 8 primes
  • 1277 with a run of 9 primes
  • 113143 with a run of 10 primes
  • 1464251 with a run of 11 primes
In summary, the sequence is 97, 149, 1277, 113143, 1464251 (permalink).

If we allow runs that equal the previous records then we get the following:

  • 97 with a run of 6 primes
  • 149 with a run of 8 primes
  • 251 with a run of 8 primes
  • 587 with a run of 8 primes
  • 1277 with a run of 9 primes
  • 71327 with a run of 9 primes
  • 88789 with a run of 9 primes
  • 113143 with a run of 10 primes
  • 1464251 with a run of 11 primes
  • 7447043 with a run of 11 primes
In summary, the sequence is 97, 149, 251, 587, 1277, 71327, 88789, 113143, 1464251, 7447043 (permalink).

Thursday, 13 March 2025

Other Special Classes of Interprimes

On the 1st November 2023, I posted on A Special Class of Interprime and these were non-palindromic composite numbers located between twin primes which, when reversed, are also located between twin primes. Some work both ways while some are only one way because they end in a zero. Figure 1 shows an example of the former while Figure 2 shows an example of the latter.


Figure 1


Figure 2

Today I turned 27738 days old and this number is an interprime number between twin primes which when concatenated with itself forms a number which is also an interprime between twin primes. The result for 27738 is shown in Figure 3.


Figure 3

Numbers of this sort belong to OEIS A235109 :


A235109     Averages q of twin prime pairs, such that q concatenated to q is also the average of a twin prime pair.


The initial members are (
permalink):

42, 102, 108, 180, 192, 270, 312, 420, 522, 660, 822, 882, 1230, 1482, 4242, 4788, 8820, 10332, 11550, 13692, 14550, 14562, 14868, 15732, 17910, 18522, 20550, 21648, 22620, 23670, 23832, 26262, 27738, 35838, 38922, 39042, 40128, 42018, 43962, 44532, 46440

As a variation on this, we could concatenate an interprime with its reversal, thus forming a palindrome. This is shown in Figure 4.


Figure 4

Up to 40000, the initial interprimes with this property are (permalink) 240, 270, 2142, 8388, 22092, 22962, 23832, 24420, 24918, 26262, 27690 and 28110. The sequence does not appear in the OEIS. The members of this sequence are, to be fair, rather sparse and could be made more numerous if the condition that the interprime lay between twin primes was relaxed. If we simply require that the interprime, when concatenated with its reverse, is also an interprime then in the range up to 40000, 263 numbers satisfy. The numbers are (permalink):

9, 15, 21, 42, 93, 102, 105, 108, 160, 240, 246, 270, 279, 324, 386, 432, 754, 810, 909, 933, 1092, 1302, 1452, 1611, 1998, 2142, 2205, 2295, 2322, 2336, 2470, 2568, 2667, 2892, 2900, 2946, 3021, 3326, 3423, 3453, 3465, 3558, 3588, 3627, 3672, 3736, 3885, 3921, 4002, 4065, 4076, 4131, 4353, 4422, 4646, 4742, 4785, 5193, 5439, 5481, 5502, 5529, 5607, 5804, 6107, 6340, 6376, 6798, 6969, 7182, 7212, 7494, 8097, 8169, 8388, 8437, 8844, 8908, 8985, 9394, 9678, 9865, 10008, 10101, 10794, 10815, 10875, 10944, 10998, 11226, 11445, 11523, 11817, 12024, 12111, 12252, 12489, 12500, 12514, 12826, 12947, 13056, 13101, 13320, 13374, 13482, 13560, 13674, 13740, 13881, 13965, 14064, 14415, 14592, 14715, 15015, 15087, 15534, 15664, 16230, 16396, 16799, 17388, 17529, 17958, 18042, 18288, 18360, 18447, 18531, 18737, 19149, 19314, 19548, 19704, 19857, 20022, 20049, 20057, 20225, 20358, 20403, 20687, 20745, 20751, 20808, 21015, 21104, 21189, 21202, 21381, 21404, 21558, 21969, 22092, 22272, 22719, 22866, 22904, 22962, 23124, 23631, 23832, 24036, 24144, 24333, 24420, 24522, 24804, 24855, 24918, 25001, 25080, 25305, 25417, 25455, 25470, 25578, 25595, 25761, 25932, 25960, 26180, 26262, 26412, 26582, 26637, 26675, 26748, 27075, 27429, 27546, 27597, 27690, 27999, 28110, 28117, 28253, 28314, 28410, 28629, 28692, 28869, 29247, 29577, 29720, 29826, 29865, 29937, 30106, 30165, 30217, 30270, 30693, 31149, 31152, 31182, 31269, 31536, 31617, 31653, 31977, 32244, 32325, 32700, 32914, 33186, 33288, 33573, 33588, 33621, 33639, 33854, 33939, 34125, 34290, 34412, 34590, 34683, 34743, 34874, 34962, 35094, 35421, 35674, 35802, 36003, 36442, 36486, 36648, 36694, 36764, 37220, 37514, 37548, 38385, 38856, 39093, 39159, 39447, 39627, 39852, 39999

Let's take 93 from the previous list as an example. It is an interprime that lies midway between 89 and 97. Concatenated with its reverse (39), we get 9339 and this number is midway between 9337 and 9341. Figure 5 illustrates this.


Figure 5

Similarly we could relax the interprime condition for interprimes that are concatenated with themselves (but not reversed). There are 345 interprimes in the range up to 40000 that qualify. An example is 21, an interprime between 19 and 23, that forms 2121, an interprime between 2113 and 2129.


Figure 6

The interprimes between 27700 and 40000 with this property are (permalink):

..., 27738, 27888, 27945, 27990, 28281, 28515, 28613, 28740, 28815, 28851, 28994, 29013, 29170, 29237, 29307, 29448, 29835, 29953, 30000, 30038, 30264, 30300, 30310, 30378, 30468, 30555, 30846, 30856, 30902, 31080, 31122, 31269, 31335, 31347, 31660, 31854, 31960, 32298, 32361, 32715, 32925, 32990, 33018, 33235, 33351, 33465, 33594, 33717, 33840, 33860, 34224, 34734, 34743, 34848, 35325, 35556, 35571, 35838, 35980, 36189, 36462, 36680, 37008, 37053, 37176, 37576, 37850, 38076, 38238, 38310, 38331, 38685, 38922, 39042, 39084, 39093, 39105, 39363, 39378, 39447, 39546, 39691, 39765, 39774, 39894, ...

Lastly, if we relax the interprime condition that the interprime and its reverse must lie between twin primes, then there are 629 numbers that satisfy in the range up to 40000 (permalink) but I won't list those here.

Wednesday, 12 March 2025

The Good Prime

Yes, there is such a thing as a good prime and it is defined as follows:

A prime pn is said to be good if p2n>pnipn+i for all 1i<n.

The term was drawn to my attention because the prime associated with my diurnal age today (27737) and its earlier cousin prime (27733) are both good primes. The initial good primes are: 

5, 11, 17, 29, 37, 41, 53, 59, 67, 71, 97, 101, 127, 149, 179, 191, 223, 227, 251, 257, 269, 307, 311, 331, 347, 419, 431, 541, 557, 563, 569, 587, 593, 599, 641, 727, 733, 739, 809, 821, 853

Let's look at 17 as an example where 172=289. The primes less than it are 2, 3, 5, 7, 11 and 13. The corresponding primes larger than it are 43, 37, 31, 29, 23 and 19. So we have:2×43=86<2893×37=111<2895×31=155<2897×29=203<28911×23=253<28913×19=247<289

The earliest runs of 2, 3, 4, 5, 6 and 7 consecutive good primes start at 37, 557, 1847, 216703, 6929381, 134193727 and 15118087477. The good primes from 27733 to 40000 are as follows (permalink):

27733, 27737, 28277, 28387, 28403, 28493, 28537, 28571, 28591, 28597, 29833, 29983, 30011, 30059, 30089, 30491, 30631, 30637, 30671, 30757, 30803, 31121, 31139, 31147, 31957, 32027, 32051, 32057, 32297, 32969, 33287, 33311, 33329, 34123, 35729, 35747, 35797, 35801, 35831, 35951, 35963, 36433, 36451, 36467, 36523, 36527, 36671, 38113, 38149, 38167, 38177, 38543, 38557, 38593, 38651, 38669, 39079, 39089

Clearly the primes above and below the aspiring good prime need to be fairly bunched up, especially the ones above, and this is indeed the case for 27733 and 27737.

Sunday, 9 March 2025

Mathematics Puzzle Template

There is a type of Mathematical Puzzle that follows the template shown in Figure 1.


Figure 1

The puzzle above isn't too difficult to solve once one realises that the numbers in three out of the four inner quadrants are formed from the two numbers in the corresponding outer part of the quadrant by the formula:inner number = (larger number - smaller number)3
Thus the missing number is calculated as follows:(82)3=63=216
Removing the numbers from Figure 1 we are left with the (rather crude) template shown in Figure 2.


Figure 2

Using this template, it's easy to come up with other puzzles such as the one shown in Figure 3.


Figure 3

Here the solution lies in the fact that:inner number = (larger number + smaller number) mod 7

The solution is thus:(11+3) mod 7 =14 mod 7=0
I may create more puzzles in the future using this template.

Saturday, 8 March 2025

Density of Primes

It's well known that the density of primes decreases as we proceed along the number line but, in the range of numbers up to 100,000, where can we find intervals where the density of primes is quite high. To quantify this density, let's take a prime and consider the next FIVE primes that follow it. Now let's calculate the difference between this sixth prime and the first and call this difference the "gap". Thus we have primes 1 to 6 and the gap is given by:gap = prime 6 - prime 1
Where is this gap equal to 14 (which is minimum possible)? We'll identify the position by reference to the first prime and the gap will tell us the sixth prime because:prime 6 = prime 1 + gap
And so we have the following gap statistics:gaps of 14 occur at 3,5
gaps of 16 occur at 7,97,16057,19417,43777
gaps of 18 occur at11,13,29,223,1289,1481,1861,4783,5639,5641,13679,27733,44263,80669,88799,88801,93479
gaps of 20 occur at17,23,41,53,59,89,179,263,599,641,809,1277,1283,1601,1607,3449,3527,3911,4001,4637,5849,9419,14543,18041,19421,21011,22271,26681,26711,43781,45119,51419,54401,55331,62969,65699,71327,75983,87539,88793,97367,97841
Figure 1 shows a plot of the various primes (up to 100,000) and their associated gaps. The largest gap of 154 occurs at 69499 and thus the interval is from 69499 to 69653.


Figure 1: permalink

What I've considered is just one measure of prime density. The decision to consider the gap between six successive primes is quite arbitrary. I could have considered five or seven.