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.