Sunday, 28 May 2023

A Prolific Pair: 364585 and 820359

What do the numbers 364585 and 820359 have in common? Well, they're both odd for starters. However, although it's not obvious, they are both prolific in the sense that when squared, they produce numbers that have seven sequential, identical, non-zero digits (permalink):$$ \begin{align} 364585^2 &= 132922222225\\820359^2 &= 672988888881 \end{align}$$They are the only numbers with this property in the range up to one million. The first number mentioned (364585) makes an appearance in OEIS  A167712 for the case of \(n=7\):


 A167712

\(a(n) \) = the smallest positive number, not ending in 0, whose square has a substring of exactly \(n\) identical digits.



The sequence begins: 1, 12, 38, 1291, 10541, 57735, 364585, 1197219, 50820359, 169640142, 298142397, 4472135955, 1490711985, 2185812841434

This same number makes another appearance in OEIS A048347 for the case of \(n=8\) where it should be noted that the identical digits are not necessarily sequential


 A048347

\(a(n)^2\) is the smallest square containing exactly \(n\) 2's.



The sequence begins: 5, 15, 149, 1415, 4585, 14585, 105935, 364585, 3496101, 4714045, 34964585, 149305935, 1490725415, 4714469665, 1490711985, 149071333335, 1105537083332, 1489973900149, 15106363633335, 47140462469223

If we look at the cubes of numbers, then not surprisingly more numbers satisfy, specifically (permalink):$$ \begin{align} 339247^3 &= 39043437522222223 \\475741^3 &= 107674222222294021 \\ 720993^3 &= 374794444444986657 \\ 822389^3 &= 556201144444449869 \\ 699637^3 &= 342466666667067853 \\ 360598^3 &= 46888888826167192 \\ 948083^3 &= 852195188888887787 \\985426^3 &= 956912108888888776 \\ 764149^3 &= 446204706999999949 \end{align} $$So nothing profound in this post, just some peculiarities of the base 10 number system that produce runs of seven identical non-zero digits for certain squares and cubes of numbers up to one million.

Wednesday, 24 May 2023

That Number Again

The number associated with my diurnal age today, 27079, is a member of OEIS  A133562:


  A133562

Numbers which are the sum of the squares of seven consecutive primes.   
  


In the case of 27079, the primes are as shown below (permalink):$$47^2+ 53^2+ 59^2+ 61^2+ 67^2 +71^2+ 73^2 = 27079$$However, it is the very first term in this sequence that is most interesting as it is the number 666:$$2^2+3^2+5^2+7^2+11^2+13^2+17^2=666$$It is the only even number in the sequence because it includes the even square \(4=2^2\). I naively thought that it might be possible to arrange these squares to form an \(18 \times 37\) rectangle but I was swiftly disabused of this notion when I recalled a post called Squaring the Square that I'd made on January 29th 2021.

In this post, I note that the smallest square that can be constructed of smaller squares of unequal size requires 21 squares and has a side of 112 units. The smallest rectangle than can be constructed from smaller squares of unequal size requires 9 squares and has dimensions of \(32 \times 33 \) units. Clearly then a rectangle of dimensions \(18 \times 37\) cannot be constructed from only seven unequal squares.

However, I did find a decomposition of the square of side 666 into 26 smaller squares of unequal size. These squares have the following sides: 2, 3, 8, 33, 36, 55, 65, 69, 89, 90, 97, 102, 105, 107, 109, 111, 120, 129, 132, 171, 175, 185, 186, 220, 230, 261. See Figure 1.


Figure 1: decomposition of square of side 666 (source)

This square of side 666 units has an area of 443556 square units. So just an interesting little diversion with the result that:$$2^2+ 3^2 + \dots + 230^2+ 261^2 = 666^2$$

Sunday, 21 May 2023

Loeschian Primes

I wrote about Loeschian numbers in an eponymous post on January 5th 2022 where I wrote that Loeschian numbers are numbers of the form \(x^2+xy+y^2\) where \(x\) and \(y\) are positive integers. These integers do not need to be distinct and do not need to be prime. Of the first one thousand integers, 277 of them are Loeschian and so they are relatively common.

However, if we restrict \(x\), \(y\) and the Loeschian number itself to being prime then the resultant Loeschian primes form OEIS A244146:


 A244146

Primes of the form \(x^2 + x \times y + y^2\) with \(x\), \(y\) primes.       
                 

The initial members of the sequence are (permalink):

19, 67, 79, 109, 163, 199, 349, 433, 457, 607, 691, 739, 937, 997, 1063, 1093, 1327, 1423, 1447, 1489, 1579, 1753, 1777, 1987, 2017, 2089, 2203, 2287, 2383, 2749, 3229, 3463, 3847, 3943, 4051, 4177, 4513, 4567, 5347, 5413, 5479, 5557, 5653, 6079, 6133, 6271, 6661, 7537, 7867, 7873, 8287, 9973, 10513, 10597, 10957, 11149, 11161, 11329, 11779, 11863, 11923, 12007, 12163, 12451, 12583, 13009, 13063, 13093, 13597, 14293, 14407, 14437, 15277, 15307, 15727, 16519, 17359, 17659, 18127, 19213, 19477, 19603, 19687, 19777, 20011, 20719, 21193, 22963, 23017, 23293, 23581, 23977, 24421, 24967, 25657, 26347, 26497, 26701, 27067, 27103, 27409, 27697, 27817, 28789, 29629, 30187, 30427, 31189, 31237, 32587, 33091, 33343, 33577, 33613, 33751, 34231, 34537, 35353, 35437, 35803, 36919, 37699, 37747, 38239, 38851, 39133, 39157, 39217, 39409, 39667, 40213, 40237, 40471, 40819, 41263, 41467, 41539, 41863, 41911, 42223, 43321, 44203, 44917, 46681, 47797, 48157, 48523, 49927, 50287, 50707, 51853, 52957, 53233, 54547, 54673, 57973, 58771, 59743, 62233, 62347, 63577, 64927, 65983, 66763, 66943, 69709, 70423, 74857, 76243, 78853, 79693, 81931, 82351, 84697, 84793, 85513, 91453, 97369, 103813, 103837, 107227

It can be noted that \(x\) and \(y\) cannot be equal otherwise we have \(3x^2\). The first Loeschian prime is 19 and is constructed as follows:$$2^2+2 \times 3 + 3^2=19$$The last prime in the above list is 107227 and is constructed as follows:$$181^2+181 \times 197 + 197^2= 107227$$Interestingly none of these primes are Sophie Germain primes. If we extend the range to one million there are still none. 

However, if we look for primes of the form \(2p-1\) rather than \(2p+1\), we find many. In the range up to about a quarter of a million, there are 1706 Loeschian primes and, of these, 309 are of the form \(2p-1\). These primes are:

19, 79, 199, 607, 691, 937, 997, 2089, 4051, 4177, 4567, 5479, 5557, 6079, 6271, 7537, 7867, 8287, 10597, 11779, 13009, 14407, 15277, 16519, 17659, 19477, 19687, 23581, 26701, 27067, 27817, 30187, 31237, 32587, 33577, 34537, 39667, 40237, 40819, 41539, 44917, 52957, 57037, 57487, 57847, 58567, 58771, 62347, 64927, 69247, 74527, 74857, 75781, 77569, 81931, 82351, 87697, 89071, 89767, 92347, 94219, 95317, 96757, 97327, 98947, 102241, 103837, 108517, 109717, 113329, 114859, 114889, 116191, 127657, 129967, 133261, 133717, 135799, 137791, 154579, 160861, 161527, 164419, 164617, 170197, 172801, 174877, 174907, 181081, 188827, 190837, 201997, 210229, 215767, 216481, 218749, 226267, 226777, 228577, 229267, 232861, 233917, 234457, 238639, 239137, 244159, 244567, 245269, 247519, 248407, 255181, 256579, 259717, 261631, 264991, 280327, 293767, 298159, 303151, 310567, 311407, 311827, 315097, 321187, 325477, 328921, 332617, 336901, 343087, 351457, 351517, 362407, 364537, 367687, 377617, 378997, 382549, 385027, 385057, 402037, 406117, 406789, 407857, 409177, 416947, 423769, 428167, 430747, 435307, 436957, 443089, 454849, 455647, 457981, 458317, 464467, 467017, 470461, 473287, 486769, 487717, 500911, 519301, 525127, 531457, 534241, 534637, 541267, 542149, 544477, 547237, 555967, 564667, 568807, 575557, 580747, 610447, 620947, 621739, 630967, 633037, 634597, 640837, 644257, 651727, 652417, 655399, 673951, 693097, 703897, 705787, 706837, 709117, 710557, 739507, 741847, 761977, 763897, 769597, 771769, 778237, 780817, 784129, 796267, 803911, 811777, 813097, 813217, 823399, 826759, 830719, 832747, 841207, 857029, 858427, 867487, 877567, 888397, 888541, 894547, 897601, 903757, 908671, 909289, 912337, 916417, 918079, 924139, 956107, 960217, 970867, 971077, 974137, 975847, 986149, 987061, 989887, 992449, 999067, 1009669, 1018447, 1024477, 1024987, 1027459, 1030867, 1037857, 1044457, 1050391, 1050811, 1058221, 1059547, 1061317, 1112341, 1113667, 1130359, 1132309, 1137457, 1139227, 1145269, 1155997, 1192267, 1203667, 1209337, 1231177, 1248271, 1257787, 1260577, 1283677, 1285777, 1294597, 1332547, 1335361, 1351117, 1385947, 1395127, 1442377, 1457647, 1468507, 1472077, 1485937, 1522447, 1559689, 1563817, 1572871, 1609477, 1620739, 1631491, 1635559, 1662457, 1688497, 1693429, 1699381, 1712149, 1724617, 1755739, 1795867, 1831441, 1900687, 1908367, 1911037, 1959697, 2028277, 2103307, 2116969, 2193337, 2232427, 2407117, 2413927, 2599189

Take the first as an example:$$19 \times 2 -1=37 \text{ which is prime}$$If we look at the final number in the list above, we see that:$$25599189 \times 2 -1=51198377 \text{ which is prime}$$Of all these Loeschian and \(2p-1\) primes above, only one leads to a prime that is also Loeschian and that prime is 2089 leading to 4177. Here are their constructions:$$ \begin{align} 2089&=5^2 + 5 \times 43 + 43^2\\4177 &= 2089 \times 2 -1\\&=19^2+19 \times 53 +53^2 \end{align}$$We have to go to 3296949 before this happens again:$$ \begin{align} 3291949 &=397^2+ 397 \times 1583+1583^2\\ 6583897 &=3291949 \times 2 -1\\ &=53^2+53 \times 2539 + 2539^2 \end{align}$$If we extend our range still further we find the following: 27793477, 65947201, 87196177, 88718437, 160502137 and 172502377. Clearly such numbers are few and far between (permalink).

Friday, 19 May 2023

A Special Class of Collatz Trajectories

I've written about Collatz trajectories over the years but a special class of trajectory was brought to my attention thanks to the number, 27074, associated with my diurnal age today. This number is a member of OEIS A224303:


 A224303

Numbers \(n\) for which number of iterations to reach the largest equals number of iterations to reach 1 from the largest in Collatz (3\(x\)+1) trajectory of \(n\).



The trajectory of 27074 requires 64 steps to reach 1 and therefore 65 numbers are involved once we include the starting number. These are the numbers (permalink):

27074, 13537, 40612, 20306, 10153, 30460, 15230, 7615, 22846, 11423, 34270, 17135, 51406, 25703, 77110, 38555, 115666, 57833, 173500, 86750, 43375, 130126, 65063, 195190, 97595, 292786, 146393, 439180, 219590, 109795, 329386, 164693, 494080, 247040, 123520, 61760, 30880, 15440, 7720, 3860, 1930, 965, 2896, 1448, 724, 362, 181, 544, 272, 136, 68, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1

The maximum value reached is 494080 and this is the 33rd term. There are 32 terms before it and 32 terms after it. In other words, 32 steps are required to reach the maximum and from there 32 steps are required to reach 1. This is shown in Figure 1:


Figure 1: permalink

The terms in OEIS 
A224303 up to 40000 are as follows (permalink):

1, 6, 120, 334, 335, 804, 1249, 2008, 2010, 2012, 2013, 6556, 6557, 6558, 6801, 6802, 6803, 7496, 7498, 7500, 7501, 7505, 10219, 22633, 25182, 25183, 27074, 27075, 27864, 27866, 27868, 31838, 31839, 32078, 36630, 36633, 36690, 36691, 36914, 39126, 39344, 39346, 39348, 39352, 39354

The terms appear in clusters. For example, 27075 belongs to the sequence as well as 27074. This clustering is more evident once we plot the numbers as shown in Figure 2:


Figure 2: permalink

It can be noted that the Collatz trajectory of 27075 also requires 64 steps to reach 1, attains the same maximum value of 494080 after 32 steps and then another 32 steps to reach 1.  The trajectory is as follows:

27075, 81226, 40613, 121840, 60920, 30460, 15230, 7615, 22846, 11423, 34270, 17135, 51406, 25703, 77110, 38555, 115666, 57833, 173500, 86750, 43375, 130126, 65063, 195190, 97595, 292786, 146393, 439180, 219590, 109795, 329386, 164693, 494080, 247040, 123520, 61760, 30880, 15440, 7720, 3860, 1930, 965, 2896, 1448, 724, 362, 181, 544, 272, 136, 68, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1

Compare this to that of 27074, we see that they differ only in first five terms before merging at 30460:

27074, 13537, 40612, 20306, 10153, 30460, 15230, 7615, 22846, 11423, 34270, 17135, 51406, 25703, 77110, 38555, 115666, 57833, 173500, 86750, 43375, 130126, 65063, 195190, 97595, 292786, 146393, 439180, 219590, 109795, 329386, 164693, 494080, 247040, 123520, 61760, 30880, 15440, 7720, 3860, 1930, 965, 2896, 1448, 724, 362, 181, 544, 272, 136, 68, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1

So overall an interesting class of Collatz trajectories, just adding to the fascination of the 3\(x\)+1 problem. 

Thursday, 18 May 2023

Another Palindromic Cyclops Number


A thousand and ten days ago, I made a post titled Palindromic Cyclops Numbers in which I focused on the number associated with my then diurnal age of 26062. Today I turned 27072 days old and I'm reminded of such numbers once again. They form OEIS  A138131:


 
A138131

Palindromic cyclops numbers.                                  



The sequence follow a predictable pattern:

0, 101, 202, 303, 404, 505, 606, 707, 808, 909, 11011, 12021, 13031, 14041, 15051, 16061, 17071, 18081, 19091, 21012, 22022, 23032, 24042, 25052, 26062, 27072, 28082, 29092, 31013, 32023, 33033, 34043, 35053, 36063, 37073, 38083

Some of these numbers are prime, such as 101, but not all. 27072 is composite and in fact it has 42 divisors which qualifies it for membership of OEIS A175750$$27072 = 2^6 \times 3^2 \times 47 \rightarrow \text{ 42 divisors}$$
 
 A175750
 
Numbers with 42 divisors.       
                                               


The initial members of the sequence are as follows:

2880, 4032, 4800, 6336, 7488, 9408, 9792, 10944, 11200, 13248, 14580, 15552, 15680, 16704, 17600, 17856, 20412, 20800, 21312, 23232, 23328, 23616, 24768, 27072, 27200, 30400, 30528, 32076, 32448, 33984, 34496, 35136, 36450, 36800, 37908, 38592, 38720, 40768

I've marked in red the numbers in this sequence that are palindromic. As can be seen, 27072 is the only palindromic cyclops number that has 42 divisors. If we extend the range up to ten million, there are only these very few palindromic numbers with 42 divisors: 2308032, 4099904, 6714176 and 8820288.

Another of 27072's claim to fame is that it is 100-gonal number and thus a member of OEIS A261276. Such numbers are generated from the formula$$ \begin{align} \text{number } &= \frac{(s-2) \times n \times(n-1)}{2}+ n \\ &= \frac{98 \times n \times(n-1)}{2}+ n \text{   since } s=100 \end{align} $$The initial members of the sequence are (permalink):

0, 1, 100, 297, 592, 985, 1476, 2065, 2752, 3537, 4420, 5401, 6480, 7657, 8932, 10305, 11776, 13345, 15012, 16777, 18640, 20601, 22660, 24817, 27072, 29425, 31876, 34425, 37072, 39817, 42660, 45601, 48640, 51777, 55012, 58345, 61776, 65305, 68932, 72657, 76480

The number 27072 is also "bipronic" which is a term I've not encountered before, although I'm familiar with the term "pronic". The former term is an extension of the later so that bipronic numbers are of the form:$$ x \times (x+1) \times y \times (y+1) \\ \text{ where }x \text{ and } y \text{ are distinct integers}$$In the case of 27072 we have$$27072 = 3 \times 4 \times 47 \times 48$$These types of bipronic numbers form OEIS A053990 and if we relax the condition that \(x\) and \(y\) need to be distinct, then we have OEIS A072389. Combining the bipronics from OEIS A072389 with the palindromes, we get OEIS A346919:


 A346919

Numbers that are both palindromes (A002113) and terms of A072389.     



The initial members of this sequence are:

0, 4, 252, 2112, 2772, 6336, 21012, 27072, 42924, 48384, 48984, 63036, 252252, 297792, 407704, 2327232, 2572752, 2747472, 2774772, 2958592, 4457544, 4811184, 6378736, 6396936, 25777752, 27633672, 29344392, 63099036, 63399336, 404080404, 409757904, 441525144

The number 27072 also arises when we consider the sum of the divisors of the number of partitions of \(n\). These sums form OEIS A139041:


 A139041

Sum of divisors of the number of partitions of \(n\).           



The initial members of this sequence are:

1, 3, 4, 6, 8, 12, 24, 36, 72, 96, 120, 96, 102, 240, 372, 384, 480, 576, 1026, 960, 2340, 2016, 1512, 3224, 3240, 6720, 6336, 6588, 6048, 13104, 11232, 12768, 17784, 22176, 22344, 17978, 27072, 35112, 69696, 87552, 74496, 87048, 104544, 97216, 137088, 214896

In the case of 27072, we have \(n=37\) with the the number of partitions of 37 being equal to 21637 and with the divisors [1, 7, 11, 77, 281, 1967, 3091, 21637] adding to the number. There are of course many other properties associated with this number but I'll end off there.

Monday, 15 May 2023

Base-2 Harshad Numbers

I've written explicitly about Harshad numbers in two previous posts: Harshad Numbers on Saturday, 11 February 2017 and Harshad Numbers Revisited on Saturday, 30 June 2018. However, I've only mentioned Base-\(n\) Harshad numbers in passing and so this post will be about them, although the focus will be on the value of \(n=2\).

I was reminded of them because the number associated with my diurnal age today, 27070, has a property that affords it membership in OEIS A330932. Let's remember that Niven numbers are another name for Harshad numbers.


  A330932

Starts of runs of 3 consecutive Niven numbers in base 2 (A049445).          


What characterises a Harshad or Niven number is that it's divisible by the sum of its digits. For example, 12 has a sum of digits of 3 and 3 divides evenly into 12. Hence 12 is a Harshad number in base 10 but what about in base 2? The binary representation of 12 is 1100 and its sum of digits is then 2 which also divides 12 and thus 12 is also a Harshad number in base 2. 

As it turns out, 12 is a Harshad number in all bases but octal where it is represented as 14. The sum of digits, 5, does not divide into 12. There are only four all-harshad numbers and they are 1, 2, 4, and 6. However, let's get back to  27070, 27071 and 27072 and check that they are indeed Harshad numbers:$$\begin{align} 27070 &= 110100110111110_2\\ \text{sum of digits }&=10\\ \frac{27070}{10} &= 2707 \\ \\27071 &= 110100110111111_2\\ \text{sum of digits }&=11\\ \frac{27071 }{11}&=2461 \\ \\ 27072 &= 110100111000000_2\\ \text{sum of digits } &= 6\\ \frac{27072}{6} &= 4512 \end{align}$$So sure enough, 27070 does begin a run of three Harshad numbers in base 2. The other members of the sequence, up to 40000, are (permalink): 623, 846, 2358, 4206, 4878, 6127, 6222, 6223, 12438, 16974, 21006, 27070, 31295, 33102, 33103, 35343, 37134, 37630, 37638.

To quote from Wikipedia:
Cooper and Kennedy proved in 1993 that no 21 consecutive integers are all harshad numbers in base 10. They also constructed infinitely many 20-tuples of consecutive integers that are all 10-harshad numbers, the smallest of which exceeds \(10^{44363342786} \).

H. G. Grundman (1994) extended the Cooper and Kennedy result to show that there are \(2b\) but not \(2b + 1\) consecutive \(b\)-harshad numbers for any base \(b\). This result was strengthened to show that there are infinitely many runs of \(2b\) consecutive b-harshad numbers for \(b = 2\) or \(3\) by T. Cai (1996) and for arbitrary b by Brad Wilson in 1997.

In binary, there are thus infinitely many runs of four consecutive Harshad numbers and in ternary infinitely many runs of six.

Runs of four consecutive base-2 Harshad numbers occur for very large numbers. I checked and there were none in the range up to one million and, I suspect, far beyond this.

Saturday, 13 May 2023

The March of Time

I've written about what I term AD and BC numbers in a post titled, quite sensibly, AD and BC Numbers. I was reminded of them because my diurnal age today, 27068, converts to 69BC in hexadecimal. For some time now, these BC numbers have been occurring every 256 days.

24764 --> 60bc

25020 --> 61bc

25276 --> 62bc

25532 --> 63bc

25788 --> 64bc

26044 --> 65bc

26300 --> 66bc

26556 --> 67bc

26812 --> 68bc

27068 --> 69bc

However, this regular march of time is now at an end because if 256 is added to 27068, the resultant number (27324) is 6ABC. The decimal equivalent of 70AD is 28845, representing a jump of 1792 or 7 x 256 days.


Similarly, I recently turned 27053 days old which is 69AD in hexadecimal. Notice the difference of 14 days between 69AD and 69BC. This number was also the end of a run of numbers differing by 256 days.
 

24749 --> 60ad


25005 --> 61ad


25261 --> 62ad


25517 --> 63ad


25773 --> 64ad


26029 --> 65ad


26285 --> 66ad


26541 --> 67ad


26797 --> 68ad


27053 --> 69ad


The decimal equivalent of 70AD is 28845, again a jump of 1792 or 7 x 256 days. Taken over a long enough time period, this represents an average advance of a little over 395.6 days, about a month longer than the solar year. Both AD and BC dates are advancing at this average rate.


However, it will almost five years before I encounter another hexadecimal AD and BC number so I thought it important to mark the fact in this post. While exercises like this may seem frivolous, they nonetheless provide an opportunity to work with hexadecimal numbers and convert from decimal to hexadecimal and vice versa. I'm always thinking in terms of the former mathematics teacher who I once was.


How can hexadecimal numbers be made interesting for students? These AD and BC numbers are a way of doing this. The question could be asked of students:

Find out your diurnal age and determine when you will next have a connection to AD or BC year (via decimal to hexadecimal conversion). What was significant about that year.

See my post titled 69BC for details on what was significant about this year in history. Students could be shown how to determine their diurnal age using Wolfram Alpha and they could also use it to convert between decimal and hexadecimal. Overall, a useful and interesting exercise.

Friday, 12 May 2023

Prime Emirp Pair Averages

An emirp is a prime that remains prime when its digits are reversed. The prime and its reversal must be different and so this excludes palindromic primes like 101. The smallest emirp is 13 that, when reversed, gives 31 which is also prime.  By "Prime Emirp Pair Averages", I mean primes that are the average of an emirp pair. The first such prime is 11311, a palindromic prime, and it is the average of the emirp pair 10321 and 12301. Thus$$11311=\frac{10321+12301}{2}$$These sorts of primes form OEIS A178581:


 A178581

Primes that are the average of the members of emirp pairs.            


The initial members are:

11311, 12721, 13831, 14741, 16061, 16561, 17471, 18481, 20507, 21107, 21407, 21617, 21817, 22727, 23027, 23227, 23327, 23537, 24137, 24547, 24847, 25147, 25247, 25447, 25657, 26357, 27067, 27367, 28277, 34543, 34843, 35153, 35353

Some of these primes are the average of more than one emirp pair. The first such prime is 14741, another palindromic prime, and it is the average of two emirp pairs: the first pair being 10781 and 18701 and the second being 13751 and 15731. $$ \begin{align} 14741&=\frac{10781+18701}{2}\\ &=\frac{13751+15731}{2} \end{align}$$The first such prime that is the average of three emirp pairs is 24547. It is the average of (11083, 38011), (12073, 37021) and (18013, 31081). Thus$$ \begin{align} 24547&=\frac{11083+38011}{2}\\ &=\frac{12073+37021}{2} \\ &= \frac{18013+31081}{2} \end{align}$$The first such prime that is the average of four emirp pairs is 25447. It is average of (10993, 39901), (13963, 36931), (17923, 32971) and (18913, 31981). Thus $$ \begin{align} 25447 &=\frac{10993+39901}{2} \\ &= \frac{13963+36931}{2}\\ &= \frac{17923+32971}{2} \\ &= \frac{18913+31981}{2} \end{align}$$These primes form OEIS A178587 (permalink):


 A178587

Primes that are the average of the members of more than one emirp pair.   



The initial members are:

14741, 22727, 23327, 24547, 25447, 27067, 28277, 42929, 63541, 65761, 85453, 1217171, 1221221, 1227271, 1243421, 1245421, 1246471, 1250521, 1253521, 1257521, 1261571, 1271671, 1283771, 1327231, 1335331, 1338331, 1339381 

What's noteworthy with this sequence is the gap between 85453 and the next prime, 1217171. That's quite a gap. I was alerted to these sorts of primes because the number associated with my diurnal age, 27067, is a member of OEIS A178587as well as OEIS A178581 of course. For want of a better name, a prime of this sort might be called a PEPA prime with the acronym standing for Prime Emirp Pair Average.

Tuesday, 9 May 2023

Sums and Concatenations of Cubes and Squares

There's something very obvious about the number associated with my diurnal age today. The number is 27064 and the cubes (27 and 64) stand out clearly. In fact 27064 can be written as a sum of two cubes:$$ \begin{align} 27064 &=27000+64\\&=30^3+4^3 \end{align}$$Unfortunately, the number cannot be written as a concatenation of two cubes because the zero gets in the way. The problem is that 4 cubed has only two digits. However, the cubes of the numbers from 5 to 9 all have three digits and so the zero disappears. This allows us to write the following numbers as both sums and concatenations of two cubes. The symbol | indicates concatenation$$27125 =30^3+5^3 = 3^3|5^3\\27216 =30^3+6^3 = 3^3|6^3\\27343 = 30^3+7^3 = 3^3|7^3\\27512 = 30^3+ 8^3 = 3^3|8^3\\27729 = 30^3+9^3=3^3|9^3$$This series of numbers is the last that will occur in my lifetime because the next such sets of numbers will begin with 64125. However, if we were to consider sums of squares and concatenations of squares then I may see these come to pass. Consider the following sets of numbers, some of which occur more than once (permalink).$$36100= 114^2+152^2=6^2|10^2\\36121 =20^2+ 189^2=6^2|11^2\\36121 =61^2+ 180^2=6^2|11^2\\36196=40^2+ 186^2=6^2|14^2\\36324 =90^2+ 168^2=6^2|18^2\\36361 =60^2 +181^2=6^2|19^2\\36361=125^2+ 144^2=6^2|19^2\\36441=96^2+ 165^2=6^2|21^2\\36529=48^2+ 185^2=6^2|23^2\\36625=12^2+ 191^2=6^2|25^2\\36625=56^2+ 183^2=6^2|25^2\\36625=65^2+ 180^2=6^2|25^2\\36625=105^2+ 160^2=6^2|25^2\\36676=24^2+190^2=6^2|26^2\\36676=80^2+174^2=6^2|26^2\\36900 =6^2+ 192^2=6^2|30^2\\36900=48^2+ 186^2=6^2|30^2\\36900= 120^2+ 150^2=6^2|30^2$$The first of these numbers (36100) corresponds to Monday, February 3rd, 2048 by which time I'll be almost 88. Maybe I'll make it, maybe I won't.

Monday, 8 May 2023

Brazilian Primes

There's only one reference that I've made to Brazilian primes in this blog and that was in a post titled Fermat Primes and Brazilian Numbers on February 26th 2018 which is now over five years ago. I was reminded of them once again when a number associated with my diurnal age, 27061, was identified as a Brazilian prime. I wrote the following about Brazilian numbers in that earlier post:

These numbers are listed in OEIS A125134 and defined as:

Numbers \( n \) such that there is a natural number \( b \) with \( 1 < b < n-1 \) such that the representation of \( n \) in base \( b \) has all equal digits.

All even numbers \( \geq \) 8 are Brazilian numbers because: $$ \begin{align} 2p&=2(p-1)+2 \\&= 22 \end{align}$$in base \(p-1\) if \(p-1>2 \) and that is true if \(p \geq 4 \). 

The odd Brazilian numbers are listed in OEIS A257521 and are fairly common, with some being prime numbers:

7, 13, 15, 21, 27, 31, 33, 35, 39, 43, 45, 51, 55, 57, 63, 65, 69, 73, 75, 77, 81, 85, 87, 91, 93, 95, 99, 105, 111, 115, 117, 119, 121, 123, 125, 127, 129, 133, 135, 141, 143, 145, 147, 153, 155, 157, 159, 161, 165, 171, 175, 177, 183, 185, 187, 189, 195, ...

As an example, take 27 in the above sequence which can be expressed as \(33_8 \). As for the even numbers, take a number like 28. It can be written as 2 x (14-1) + 2 and thus can be represented as \(22_{13} \).

Brazilian primes are simply Brazilian numbers that are prime. These constitute OEIS A085104:


 A085104

Primes of the form \(1 + n + n^2 + n^3 + ... + n^k \) where \(n > 1\) and \( k > 1\).


For example, in the case of 27061 we have: $$ \begin{align} 27061& = 1+164+164^2 \\ &= 164^2+164+1\\&=111_{164} \end{align}$$These primes can be generated using this permalink. The initial members of the sequence are:

7, 13, 31, 31, 43, 73, 127, 157, 211, 241, 307, 421, 463, 601, 757, 1093, 1123, 1483, 1723, 2551, 2801, 2971, 3307, 3541, 3907, 4423, 4831, 5113, 5701, 6007, 6163, 6481, 8011, 8191, 8191, 9901, 10303, 11131, 12211, 12433, 13807, 14281, 17293, 19183, 19531, 20023, 20593, 21757, 22621, 22651, 23563, 24181, 26083, 26407, 27061, 28057, 28393, 30103, 30941, 31153, 35533, 35911, 37057, 37831, 41413, 42643, 43891, 46441, 47743, 53593, 55933, 55987, 60271, 60763, 71023, 74257, 77563, 78121, 82657, 83233, 84391, 86143, 88741, 95791, 98911

The OEIS comments to this sequence are informative:

The number of terms \(k+1\) is always an odd prime, but this is not enough to guarantee a prime, for example 111 = 1 + 10 + 100 = 3 x 37.

The inverses of the Brazilian primes form a convergent series; the sum is slightly larger than 0.33.

It is not known whether there are infinitely many Brazilian primes. 

Brazilian primes can be written in the form:

$$ \dfrac{(n^p - 1)}{(n - 1}\\ \text{ where } p \text{ is an odd prime and } n > 1$$

The number of terms less than \(10^n\) are 1, 5, 14, 34, 83, 205, 542, 1445, 3880, 10831, 30699, 88285, ...

Brazilian primes fall into two classes:

  • when \(n\) is prime, we get sequence OEIS A023195 except 3 which is not Brazilian,
  • when \(n\) is composite, we get sequence OEIS A285017.

The conjecture that "No Sophie Germain prime is Brazilian (prime)"  is false because:$$ \begin{align} a(856) &= 28792661\\ &= 1 + 73 + 73^2 + 73^3 + 73^4 \\&= (11111)_{73} \end{align} $$and 28792661 is the 141385-th Sophie Germain prime. 

Thursday, 4 May 2023

Sphenic Numbers and Palindromes

In this post, I want to look at some connections between between sphenic numbers and palindromes. The most obvious link is to those sphenic numbers that are palindromic. In the range up to 100,000, there are 229 palindromic sphenic numbers. The list is shown below.

66, 222, 282, 434, 474, 494, 555, 595, 606, 646, 777, 969, 1001, 1221, 1551, 1771, 2222, 2882, 3333, 3553, 4334, 4994, 5335, 5555, 5665, 5885, 5995, 6226, 6446, 6886, 7337, 7557, 7667, 7777, 7887, 8338, 8558, 8998, 9339, 9669, 9779, 9889, 11211, 11811, 12121, 12621, 12921, 13731, 14241, 14541, 15051, 15951, 16261, 16761, 17171, 18381, 18681, 19491, 19591, 19691, 20002, 20702, 20802, 20902, 22222, 22922, 24042, 24342, 24542, 24742, 24942, 26062, 26162, 26462, 28082, 28282, 28382, 28582, 28882, 28982, 30003, 30503, 31413, 31913, 32123, 32223, 32523, 32623, 32923, 33333, 33733, 34143, 34743, 35553, 37373, 37973, 38283, 38883, 39093, 39193, 39693, 39893, 41114, 41214, 41914, 43334, 43934, 45154, 45354, 45854, 47174, 47274, 47474, 49594, 49994, 50005, 50105, 50205, 50405, 50605, 51815, 51915, 53635, 53735, 54245, 54345, 54645, 54845, 55155, 55255, 55455, 55555, 56165, 56465, 56665, 58785, 58985, 59095, 59395, 59495, 60106, 60706, 60906, 62326, 62626, 62726, 62926, 64046, 64146, 64546, 64946, 66266, 66466, 66566, 66866, 66966, 68086, 68186, 68386, 68686, 68786, 68986, 70007, 70807, 70907, 71517, 71617, 71817, 72127, 72427, 72527, 72627, 73337, 74847, 75057, 75257, 75757, 75957, 76067, 76467, 76867, 77577, 77777, 78987, 79097, 79597, 79797, 81318, 81818, 83138, 83238, 83738, 85058, 85258, 85458, 85558, 85758, 87378, 87478, 87878, 89198, 89498, 89798, 89898, 89998, 91119, 91419, 91819, 92229, 92729, 92929, 93439, 93939, 94449, 94549, 95259, 95459, 95559, 96069, 97179, 97279, 97679, 97779, 98589, 99199, 99399, 99499, 99699, 99799

How many of these numbers have prime factors that sum to a palindrome? Well, as it turns out, only 21. These are shown below along with the factorisations and prime factor sums:

  • 11211 = 3 * 37 * 101 --> 141
  • 11811 = 3 * 31 * 127 --> 161
  • 14241 = 3 * 47 * 101 --> 151
  • 14541 = 3 * 37 * 131 --> 171
  • 16261 = 7 * 23 * 101 --> 131
  • 16761 = 3 * 37 * 151 --> 191
  • 19591 = 11 * 13 * 137 --> 161
  • 20002 = 2 * 73 * 137 --> 212
  • 22922 = 2 * 73 * 157 --> 232
  • 26062 = 2 * 83 * 157 --> 242
  • 26162 = 2 * 103 * 127 --> 232
  • 28582 = 2 * 31 * 461 --> 494
  • 31413 = 3 * 37 * 283 --> 323
  • 31913 = 7 * 47 * 97 --> 151
  • 32123 = 7 * 13 * 353 --> 373
  • 32523 = 3 * 37 * 293 --> 333
  • 34743 = 3 * 37 * 313 --> 353
  • 50605 = 5 * 29 * 349 --> 383
  • 54245 = 5 * 19 * 571 --> 595
  • 58985 = 5 * 47 * 251 --> 303
  • 68686 = 2 * 61 * 563 --> 626
It's interesting how there are no palindromic sphenic numbers after 68686 in the range up to one hundred thousand. I decided to extend the range to one million and I found that there are surprisingly few in the range between one hundred thousand and one million. They are as follows (permalink):

  • 122221 = 11 * 41 * 271 --> 323
  • 518815 = 5 * 11 * 9433 --> 9449
  • 713317 = 11 * 19 * 3413 --> 3443
  • 751157 = 11 * 23 * 2969 --> 3003
  • 760067 = 7 * 11 * 9871 --> 9889
  • 961169 = 11 * 59 * 1481 --> 1551
We can relax our palindromic criteria and ask what sphenic numbers have prime factor sums that are palindromic. Here we are relaxing the condition that the sphenic number itself must be palindromic. In this case, there are 1403 sphenic numbers that satisfy in the range up to one hundred thousand. If we extend the range to one million, only 7172 satisfy which is about half the number expected if the previous rate remained relatively constant (permalink). 

What got me thinking about this was the number associated with my diurnal age for May 2nd 2023. This number is 27057 and its prime factors (3, 29 and 311) sum to 343. It's interesting to count the number of times that these palindromic sums occur. For instance, in the range up to one hundred thousand, the palindromic sums of 131 and 161 occur 51 times each. This is shown in Figure 1 where the number of times all sums occur is shown.


Figure 1: permalink