Loading [MathJax]/jax/output/HTML-CSS/jax.js

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.¯7391304347826086956521Thus 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<289The 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=216Removing 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 7The solution is thus:(11+3) mod 7 =14 mod 7=0I 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 1Where 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 + gapAnd 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,97841Figure 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.

Friday, 7 March 2025

Runs of Semiprimes

A little investigation has revealed that there are record runs of eight semiprimes that are each separated by one number or, to put it another way, the semiprimes form an arithmetic progression with a common difference of 2. In the range up to half a million, there are four groups of eight such semiprimes. All the numbers are odd because every fourth number is a multiple of 4 and so no such runs of eight even numbers are possible. The reason that the limit is eight semiprimes is that every ninth number is a multiple of 9. The groups are (permalink):

  • 8129 ... 8143 (see Table 1)
  • 237449 ... 237463 (see Table 2
  • 401429 ... 401443 (see Table 3)
  • 452639 ... 452653 (see Table 4)
The details are (permalink):

Table 1: permalink


Table 2: permalink


Table 3: permalink



Table 4: permalink

As I later discovered, these four numbers form the initial terms of OEIS A217222.


A217222
    Initial terms of sets of 8 consecutive semiprimes with gap 2.


The initial terms are:

8129, 237449, 401429, 452639, 604487, 858179, 1471727, 1999937, 2376893, 2714987, 3111977, 3302039, 3869237, 4622087, 7813559, 9795449, 10587899, 10630739, 11389349, 14186387, 14924153, 15142547, 15757337, 18017687, 18271829, 19732979, 22715057, 25402907

Here are the OEIS comments:
  • All terms == 11 (mod 18).
  • Also all terms of sets of 8 consecutive semiprimes are odd, e.g., {8129, 8131, 8133, 8135, 8137, 8139, 8141, 8143} is the smallest set of 8 consecutive semiprimes.
  • Note that in all cases "9th term" (in this case 8143+2=8145) is divisible by 9 and hence is not semiprime.
  • Also note that all seven "intermediate" even integers (in this case {8130, 8132, 8134, 8136, 8138, 8140, 8142}) have at least three prime factors counting with multiplicity. Up to n = 40*10^9 there are 5570 terms of this sequence.
There is another sequence, of which OEIS A217222 is a subsequence, wherein an even semiprime is contained in the run of eight odd semiprimes. This is OEIS A082919.


A082919    Numbers k such that k, k+2, k+4, k+6, k+8, k+10, k+12 and k+14 are semiprimes.


The initial members of this sequence are (members of A217222 are shown in blue):

8129, 9983, 99443, 132077, 190937, 237449, 401429, 441677, 452639, 604487, 802199, 858179, 991289, 1471727, 1474607, 1963829, 1999937, 2376893, 2714987, 3111977, 3302039, 3869237, 4622087, 4738907, 6156137, 7813559, 8090759

Take 9983 as an example. There is still the run of eight odd semiprimes but, between 9985 and 9987, there is 9986 which is also a semiprime. In all the non-blue numbers above, there is only the one even semiprime in the range of 14 numbers, making for a total of nine semiprimes. See Table 5:

Table 5

Here are some of the OEIS comments for this sequence:
  • All terms == 11 (mod 18). - Zak Seidov, Sep 27 2012
  • There is at least one even semiprime between k and k+14 for 1812 of the first 10000 terms. - Donovan Johnson, Oct 01 2012
  • All terms == {29,47,83} (mod 90). - Zak Seidov, Sep 13 2014
  • Among the first 10000 terms, from all 80000 numbers a(n)+m, m=0,2,4,6,8,10,12,14, the only square is a(4637) + 2 = 23538003241 = 153421^2 (153421 is prime, of course). - Zak Seidov, Dec 22 2014

Monday, 3 March 2025

Negabinary Niven Numbers

Wow, yesterday's post featured Gray Code Niven Numbers and in today's post we're featuring Negabinary Niven Numbers. Here's what Gemini had to say about negabinary:

Negabinary is a base-negative-2 number system that uses the digits 0 and 1 to represent numbers. It's similar to the binary system, but without the need for a negative sign. 

How to convert to negabinary 

  • To convert a decimal number to negabinary, divide the number by -2 repeatedly. 

  • Record the non-negative remainder of 0 or 1 each time you divide. 

  • Take the remainders in reverse order to get the negabinary expansion.

Why use negabinary?

  • Negabinary doesn't require a negative sign, or two's complement.  

  • All integers, negative or positive, can be written as an unsigned stream of 1s and 0s.  

  • This representation is "more unique" than with a positive base because, without signs, there is not the problem of +0 being equal to -0. 

Related negative-base numeral systems: negadecimal (base −10) and negaternary (base −3). 

There is a great site that converts decimal to negabinary and binary to negabinary and vice versa. See Figure 1. We'll be using it shortly.


Figure 1: link

So what led me to negabinary numbers? Well, the number associated with my diurnal age today (27728) has a property that allows it membership of OEIS A331824.


A331824   Starts of runs of FOUR consecutive positive negabinary-Niven numbers, these are numbers that are divisible by the sum of their digits in their negabinary representation (A027615).

We use the site above to convert the decimal numbers 22728, 22729, 22730 and 22731 to negabinary and then test to see that the total number of 1's for each number divides the number. This is indeed the case. See Table 1.


Table 1: permalink

The initial members of the sequence are 1, 1264, 2104, 2944, 4624, 11888, 23768, 27312, 27728, 31688, 35648. 

Table 2 shows the negabinary representations of the numbers from 0 to 16:


Table 2

Sunday, 2 March 2025

Gray Code Niven Numbers

Let's recall a few facts. A Harshad or Niven number is a number that is divisible by its sum of digits. For example, 21 has a sum of digits of 3 and 3 divides 21 to give 7. Thus 21 is a Niven number, at least in base 10. What about in other bases? Well, in base 7, 21 can be represented as 30 with a sum of digits of 3 again. So 21 is a Niven number in base 7 as well. What about in base 2 where it has a representation of 10101. Again the sum of digits is 3 and thus 21 is also a Niven number in base 2. Of course, 21 is not a Niven number in all bases. In base 8, the number is represented as 25 with a sum of 7 which does not divide into it.


Source

Now I've written about Gray Code in an eponymous post on 18th June 2023 so I won't go into the topic again here. Suffice to say that to generate the Gray Code of a number we convert it to binary and make certain changes to the binary digits. Let's illustrate this by way of the number associated with my diurnal age today, 27727. It's binary representation is 110110001001111 and the Gray Code equivalent is 101101001101000. Now how many 1's are there in the latter. There are seven which corresponds of course to its digit sum. Now 7 divides 27727 because its factorisation is 7 x 17 x 233. So 27727 with its digit sum of 25 is not a Niven number in base 10. Nor is it a Niven number in base 2 where there are nine 1's. However, it is a Gray Code Niven number!

These sorts of numbers caught my attention because of OEIS A344344:


A344344  Starts of runs of 4 consecutive Gray-code Niven numbers (A344341: Gray-code Niven numbers: numbers divisible by the number of 1's in their binary reflected Gray code (A005811)).

Figure 1 shows the results for the four consecutive numbers (permalink):


Figure 1

The initial members of OEIS A344344 are:

1, 6, 30, 126, 510, 543, 783, 903, 2046, 2093, 3773, 3903, 7133, 7743, 8190, 8223, 8703, 10087, 12303, 12543, 14343, 14463, 15423, 15903, 16143, 16263, 20167, 22687, 27727, 30247, 30653, 30783, 32766, 35629, ...

Saturday, 1 March 2025

Efficient Sorting Algorithm

 Here is a problem that I came across today. Here is the link.


Place each of the numbers from 1 to 15 into the spaces provided so that the sum of any two consecutive spaces is a square number. The following clue was provided: the number 8 must be placed on one end and the number 9 must be placed on the other end.

Without the clue, there are a staggering 1,307,674,368,000 possible permutations (that's over one trillion) but with the clue this reduces to 6,227,020,800 or a little over six billion. However, the clue is very helpful because we know that next to 8 we can only place a 1 and next to the 9 we can only place a 7. So we have:9,7,x,x,x,x,x,x,x,x,x,x,x,1,8Now next to the 7 we can only place a 2 and next to the 1 we can only place a 15, so we now have:$$9, 7, 2, x, x, x, x, x, x, x, x, x, 15, 1, 8$$Next to the 2 we can only place 14 and next to the 15 we can only place a 10. This gives9,7,2,14,x,x,x,x,x,x,x,10,15,1,8Continuing this process, we find 14 can only be paired with 11 and 10 with 6. We now have:9,7,2,14,11,x,x,x,x,x,6,10,15,1,8We then quickly reach our solution:



The key to solving the problem is to begin and end the sequence of numbers with 8 and 9 or vice versa because these two initial choices determine all the remaining numbers. I asked Gemini to write a Python program to solve the problem but without giving it any clues. I also asked it to explain its thinking. Figure 1 is what it came up with, in about 67 lines of code.


Figure 1: Gemini Link

Here is how Gemini described its thinking:
Reasoning and Strategies:

is_square(n) Function:
  • This function efficiently checks if a number is a perfect square. It calculates the integer square root and compares its square to the original number. 
find_next(current_sequence, remaining_numbers) Function (Recursive Backtracking:)
  • This function uses recursion to explore possible sequences.
  • It checks if the current sequence is complete (no remaining numbers).
  • For each remaining number, it checks if it forms a square sum with the last number in the current sequence.
  • If a square sum is found, it adds the number to the sequence and recursively calls itself with the updated sequence and remaining numbers.
  • If no valid next number is found, it backtracks. 
Optimization 
Precompute Possible Pairs (Graph Representation): 
  • Instead of repeatedly checking for square sums, we precompute all possible pairs of numbers that add to a square.
  • This is stored in the possible_pairs dictionary, which represents a graph where numbers are nodes, and edges exist between numbers that form a square sum.
  • This optimization significantly reduces the number of square sum calculations. 
Optimization 
Start with Numbers with Fewer Possible Pairs:
  • The sorted_numbers list is created by sorting the numbers based on the number of possible pairs they have.
  • Starting the search with numbers that have fewer possible pairs reduces the branching factor in the recursive search. This means the algorithm explores fewer potential paths, leading to faster results.
  • This is a heuristic that helps avoid exploring large portions of the search space that are unlikely to lead to a solution. 
Backtracking Efficiency:
  • The recursive backtracking algorithm is designed to efficiently explore the search space. When a dead end is encountered (no valid next number), the algorithm immediately backtracks to the previous decision point, avoiding unnecessary exploration of other paths.
  • By combining the precomputation of possible pairs and the heuristic of starting with numbers with fewer options, the backtracking algorithm becomes much more efficient than a naive brute-force approach.
The algorithm (permalink) is easily adapted for longer runs of numbers. For example, let's say we want to arrange the number from 1 to 35. Here is one configuration (generated almost instantly):

[18, 7, 2, 14, 11, 5, 31, 33, 3, 22, 27, 9, 16, 20, 29, 35, 1, 8, 28, 21, 4, 32, 17, 19, 6, 30, 34, 15, 10, 26, 23, 13, 12, 24, 25] ... permalink

Thursday, 27 February 2025

Primeval Numbers

Today I learned what a primeval number is and it's not surprising that I haven't heard of this type of number before. They are after all rather light on the ground. Here's a definition:

Primeval number: a prime which "contains" more primes in it than any preceding number. Here "contains" means may be constructed from a subset of its digits.

Table 1 shows all the primeval numbers less than 100,000.


Table 1

These numbers form OEIS A072857. After 13679 there is huge jump to 100279.

1, 2, 13, 37, 107, 113, 137, 1013, 1037, 1079, 1237, 1367, 1379, 10079, 10123, 10136, 10139, 10237, 10279, 10367, 10379, 12379, 13679, 100279, 100379, 101237, 102347, 102379, 103679, 123479, 1001237, 1002347, 1002379, 1003679, 1012349, 1012379, 1023457, 1023467, 1023479, 1234579, 1234679, 10012349

It can be noted that all these numbers are plaindromes or numbers whose digits are in increasing order as required by the definition. For example, 31 contains three primes (3, 13 and 31) as does 13 but the former is not listed because 13 is the first prime to contain three primes.

I was made aware of these primeval numbers via a property of the number associated with my diurnal age today, 27724, that earns it admission into OEIS A173052:


A173052  partial sums of A072857 (primeval numbers: numbers that set a record for the number of distinct primes that can be obtained by permuting some subset of their digits).


These partial sums are:

1, 3, 16, 53, 160, 273, 410, 1423, 2460, 3539, 4776, 6143, 7522, 17601, 27724, 37860, 47999, 58236, 68515, 78882, 89261, 101640, 115319, 215598, 315977, 417214, 519561, 621940, 725619, 849098, 1850335, 2852682, 3855061, 4858740, 5871089

Sunday, 23 February 2025

Celebrating 27720

It's not often that numbers as large as 27720 attract 632 entries in the Online Encycopedia of Integer Sequences (OEIS). By contrast, 27719 attracts 31 entries and 27721 attracts 27 entries. So what's so special about 27720?


Well, it has lots of interesting properties. Let's look at some of them. 

PROPERTY 1

The very first entry in the database is OEIS A002182:


A002182  Highly composite numbers: numbers n where d(n), the number of divisors of n  increases to a record.

The initial record holders, up to 40000, are as follows where we see 27720 is a member:

1, 2, 4, 6, 12, 24, 36, 48, 60, 120, 180, 240, 360, 720, 840, 1260, 1680, 2520, 5040, 7560, 10080, 15120, 20160, 25200, 27720

Table 1 shows the details:

Table 1: permalink

PROPERTY 2

In a similar vein is OEIS A004394 where 27720 also features:


A004394    superabundant numbers: n such that σ(n)/n>σ(m)/m for all m<n, σ(n) being A000203(n), the sum of the divisors of n.

The initial members are as follows with most being the same as for OEIS A002182:

1, 2, 4, 6, 12, 24, 36, 48, 60, 120, 180, 240, 360, 720, 840, 1260, 1680, 2520, 5040, 10080, 15120, 25200, 27720

Table 2 shows the details:

Table 2: permalink

PROPERTY 3

Another interesting property of the number arises from its appearance in the denominator of the progressive sum of the harmonic numbers. These denominators constitute OEIS A002805.


A002805
    denominators of harmonic numbers H(n)=ni=11i

The first terms in the sequence are 1, 2, 6, 12, 60, 20, 140, 280, 2520, 2520, 27720, 27720. Table 3 shows the details.

Table 3: permalink

PROPERTY 4

The number also arises from a quite simple recurrence relation:


A052542     a(n)=2×a(n1)+a(n2), with a(0)=1,a(1)=2,a(2)=4

The initial members of the sequence are 1, 2, 4, 10, 24, 58, 140, 338, 816, 1970, 4756, 11482, 27720 (permalink).

PROPERTY 5

Since 27720=23×32×5×7×11, it is 12 times the product of the primorial number 2310=2×3×5×7×11 and this qualifies it for membership in OEIS A129912 because 12 is itself a product of primorials viz. 2 x 6.


A129912 numbers that are products of distinct primorial numbers (see A002110).

The initial members of the sequence (with the primorials themselves included) can be generated using this permalink:

1, 2, 6, 12, 30, 60, 180, 210, 360, 420, 1260, 2310, 2520, 4620, 6300, 12600, 13860, 27720, 30030, 37800

Initially I misinterpreted this sequence as meaning numbers that are multiples of primorials but this is not the case. Instead the multiples themselves must be products of primorials and this is far more restrictive.

Friday, 21 February 2025

Primorial Number Base Revisited

On the 14th February 2021, now over four years ago, I created a post on this blog about the Primorial Number System. Since then, I've thought very little about it but today's number (associated with my diurnal age) reminded me once again of this number system. The number is 27718 and it is a member of OEIS A333703:


A333703   Numbers ksuch that k divides the sum of digits in primorial base of all numbers from 1 to k.


The numbers that satisfy up to 40000 are:

1, 2, 10, 22, 58, 62, 63, 64, 66, 67, 68, 118, 178, 418, 838, 1258, 1264, 1265, 1277, 1278, 1678, 2098, 4618, 9238, 10508, 10509, 10510, 10512, 10513, 10514, 13858, 14704, 14754, 18478, 23098, 23102, 23276, 27718


Table 1 shows the numbers from OEIS A333703 together with their primorial base equivalents and the progressive totals of the digits of the all the primorial numbers up and including each number. The primorial base representation I've employed here uses the base 10 digits (0 to 9) together with a space as a separator (although colons are more commonly used). However, for numbers in the range up to 40000 that I use the base 12 system using the additional digits A for 10 and B for 11 are sufficient so that concatenation of the "placeholders" does not produce any ambiguity. The primorial number then looks like a normal base 12 number which produces an ambiguity in itself.


Table 1: permalink

Table 2 shows the numbers together with their corresponding progressive totals and the results when these totals are divided by the corresponing number.


Table 2: permalink

The next number after 22718 is 60058 so I won't be around to see that. For more information see this source. I started this blog by referring to my diurnal age on the 21st February 2025 (27718) but my diurnal age on the very next day (27719) also has a property that connects it to the primorial number base.


A343048   a(n) is the least number whose sum of digits in primorial base equals n.


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

0, 1, 3, 5, 11, 17, 23, 29, 59, 89, 119, 149, 179, 209, 419, 629, 839, 1049, 1259, 1469, 1679, 1889, 2099, 2309, 4619, 6929, 9239, 11549, 13859, 16169, 18479, 20789, 23099, 25409, 27719, 30029

Table 3 shows the increasing values of n:


Table 3: permalink