Showing posts with label cubes. Show all posts
Showing posts with label cubes. Show all posts

Friday, 25 July 2025

27872: Another Palindromic Number


For the last 800 days they've been coming around every 100 days and today marks yet another palindromic day as I turn 27872 days old. I've mentioned one of the properties of this number in my post titled Difference of Two Cubic Numbers. I noted that this palindrome is a difference of two cubes:$$27872=38^3-30^3$$Another property of this palindrome is that it is the sum of two prime palindromes in two different ways:$$ \begin{align} 27872 &= 11311 + 16561\\ &=12421 + 15451 \end{align}$$In the range up to 40000, there are only 25 palindromes with this property and these are the initial terms of OEIS A356854:

282, 484, 858, 888, 21912, 22722, 23832, 24642, 25752, 26662, 26762, 26862, 26962, 27672, 27772, 27872, 27972, 28482, 28782, 28882, 28982, 29692, 29792, 29892, 29992

27872 also has the property that it is the smallest palindrome with exactly seven prime factors, counted with multiplicity. This qualifies it for membership in OEIS A076886: smallest palindrome with exactly \(n\) prime factors (counted with multiplicity). See Figure 1 where the initial terms with their \(n\) values are listed.

Figure 1

In 100 days I'll be able to celebrate 27972 that's also a member of OEIS A356854. After that, it is only 31 days to the next palindromic day: 30003.

Difference of Two Cubic Numbers

I'm surprised that I've not dealt with this topic before but as far as I can tell I haven't. The topic in question is numbers that are the difference of two cubes, or more specifically the difference of two positive cubes. My diurnal age today is 27872, a palindrome, with the property that:$$27872 = 38^3-30^3$$It's easy enough to develop an algorithm to determine all such numbers in the range up to 40000 and the total is 825. However, if we consider only those numbers equal to or greater than 27872, then only 188 numbers qualify. They are (permalink):

27872, 27937, 28063, 28415, 28460, 28519, 28568, 28656, 28672, 28701, 28737, 28791, 28828, 28854, 29051, 29062, 29078, 29080, 29107, 29279, 29393, 29402, 29448, 29528, 29575, 29617, 29666, 29701, 29727, 29735, 29763, 29764, 29783, 29790, 30016, 30024, 30043, 30105, 30248, 30301, 30312, 30483, 30571, 30708, 30807, 30907, 30970, 31024, 31031, 31040, 31085, 31106, 31213, 31228, 31232, 31304, 31437, 31519, 31768, 31806, 31841, 31869, 31976, 32039, 32137, 32227, 32256, 32319, 32425, 32445, 32464, 32465, 32552, 32562, 32643, 32704, 32741, 32760, 32761, 32767, 32832, 32851, 32858, 32920, 32949, 32984, 33077, 33193, 33336, 33391, 33472, 33614, 33724, 33740, 33752, 33875, 34027, 34047, 34209, 34391, 34489, 34531, 34606, 34658, 34669, 34784, 34875, 34902, 34930, 34937, 35008, 35028, 35163, 35189, 35208, 35315, 35317, 35425, 35576, 35594, 35721, 35812, 35873, 35910, 35929, 35936, 35971, 36008, 36016, 36153, 36253, 36297, 36316, 36504, 36506, 36560, 36631, 36632, 36785, 36829, 37000, 37043, 37107, 37296, 37297, 37367, 37395, 37448, 37449, 37576, 37648, 37962, 37969, 37973, 38017, 38142, 38151, 38285, 38304, 38402, 38486, 38528, 38575, 38619, 38647, 38656, 38779, 38792, 38961, 39004, 39088, 39130, 39179, 39240, 39247, 39277, 39296, 39303, 39331, 39368, 39500, 39611, 39636, 39797, 39807, 39815, 39816, 39823 (see OEIS A181123)

Of these 188, there are five numbers that can be expressed as a difference of two cubes in more that one way. These are 27937, 28063, 34209, 35208 and 35929. The details are as follows:$$ \begin{align} 27937 &= 33^3- 20^3 \\ &=97^3- 96^3 \\ 28063 &= 31^3- 12^3 \\ &=40^3- 33^3 \\34209 &= 33^3- 12^3 \\ &=40^3- 31^3 \\ 35208 &= 33^3- 9^3 \\ &= 34^3- 16^3 \\ 35929 &= 33^3- 2^3 \\ &=34^3- 15^3 \end{align}$$Notice that 27937 is a difference of successive cubes but, because it is not prime, it cannot be a Cuban prime. The only Cuban prime in the range is 33391where:$$33391=106^3-105^3$$I've dealt with this category of primes in my blog post titled Cuban Primes way back in July of 2016.

Tuesday, 6 May 2025

Numbers as Sums of Two Squares and Two Cubes

One of the properties of the number associated with my diurnal age today (\( \textbf{27792} \)) is that it can be expressed as a sum of two squares as well as a sum of two cubes:$$ \begin{align} 27792 &= 84^2+144^2 \\ &= 23^3+25^3 \end{align} $$This immediately caused me to wonder how frequent numbers of this sort are. I asked Gemini to write me a Python program that would output a list of non-negative, non-zero numbers in the range up to 40000 with this dual property. I'm getting lazy I know. Previously, I would have created the SageMath code myself but ... well, this is the future I guess. Here is a link to the code.

As it turns out, such numbers are not that frequent. Here is the list:

65, 370, 468, 520, 637, 730, 793, 1125, 1241, 1332, 1853, 2205, 2745, 2960, 3744, 3925, 4097, 4160, 4706, 4825, 4941, 5096, 5256, 5840, 5913, 6344, 6641, 6984, 7202, 8125, 9000, 9325, 9386, 9477, 9773, 9928, 10656, 11458, 12005, 12168, 12913, 13357, 13498, 13949, 14824, 15626, 15633, 15689, 16021, 16354, 17261, 17640, 18369, 18737, 19721, 19773, 21953, 21960, 22681, 23680, 24901, 26117, 27792, 29449, 29818, 29952, 31213, 31400, 31850, 32389, 32776, 33280, 33650, 34704, 35037, 36650, 37577, 37648, 37681, 38600, 39429, 39528

I was surprised not to find this sequence in the OEIS. I asked Gemini to also give a breakdown of the numbers in terms of their squares and cubes. Figure 1 shows the result.


Figure 1

Some of these numbers may be expressible as sums of two squares and sums of two cubes in more than one way but at least one of the possible ways is shown in the two rightmost columns. For 27792 however, the story does end there because it turns out that this number is member of OEIS A273498: numbers that are the sum of two positive squares, a positive square and a positive cube, and two positive cubes. So for 27792, we have:$$ \begin{align} 27792 &= 84^2+144^2 \\ &=125^2+23^3\\&= 23^3+25^3 \end{align} $$We can see that:$$ \begin{align} 25^3 &= (5^2)^3 \\ &=(5^3)^2 \\ &= 125^2 \end{align}$$Thus in general if the base is a square number raised to the third power then the swap to a base that is cubic number raised to a square power is always possible. Additionally, if we have a 1 then it can be written as \(1^2\) or \(1^3\). 

I asked Gemini again to write a Python program that would generate a list of such numbers up to 40000. There were some minor hiccups with this code when entered into SageMathCell as Gemini comments upon:
My apologies for the persistent error. It seems SageMathCell might be interpreting the f-string syntax slightly differently or having an issue with the way the curly braces are nested, particularly around the conditional expression. Let's try a slightly different approach to formatting the output string, using the .format() method instead of f-strings. This might be more compatible with SageMathCell.
In the end the code timed out on SageMathCell and so I used the SageMath app on my MacBook Air to implement the code. The execution took quite some time to complete but in the end it succeeded. Here is the output (link to code):

65, 468, 730, 793, 1241, 1332, 2745, 4097, 4160, 4825, 5096, 5840, 5913, 6344, 8125, 9000, 9325, 9928, 12168, 13357, 13498, 14824, 15626, 15633, 15689, 16354, 17640, 18369, 18737, 19721, 19773, 21953, 22681, 27792, 29449, 29952, 32776, 34704, 36650, 37577

Figure 2 shows the breakdown of the individual numbers.


Figure 2

Clearly these numbers are a subset of the numbers in the previous list. The display of the code in Gemini is quite colourful and helpful as can be seen in Figure 3 that shows a snippet of the code:


Figure 3

Thursday, 20 February 2025

Not the Sum of Distinct Squares or Cubes

I guess I'd never really thought about the issue before. I've written about what numbers can and cannot be expressed as a sum of two squares and what numbers cannot be expressed as a sum of three squares but what numbers \( \textbf{cannot} \) be expressed a sum of two or more distinct squares? Well, the answer is not many and 128 is the largest of them. These number form OEIS A001422 :


A001422    Numbers which are \( \textbf{not} \) the sum of \( \textbf{distinct} \) squares.


The numbers are: 2, 3, 6, 7, 8, 11, 12, 15, 18, 19, 22, 23, 24, 27, 28, 31, 32, 33, 43, 44, 47, 48, 60, 67, 72, 76, 92, 96, 108, 112, 128


This led me on to OEIS A001476 that deals with the same issue but involving cubes. 


A001476    Numbers that are \( \textbf{not} \) the sum of \( \textbf{distinct} \) positive cubes.


2, 3, 4, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 29, 30, 31, 32, 33, 34, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 66, 67, 68, 69, 70, 71, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 93,94, 95, 96, 97, 98

These are the initial terms below 100 and the OEIS comments go on to say the following:
There are 85 terms below 100, 793 terms below 1000, but only 2765 terms below 10000, and only 23 more up to the largest term a(2788)=12758.

Thursday, 5 December 2024

Concatenated Triples Of Cubes and Doubles of Squares

The number associated with my diurnal age today, 27640, has the property that it is a sum of concatentated cubes:$$ \begin{align} 27640 &= 27 \, | \,64  \,|\, 0\\ &= 3^3  \,| \, 4^3 \, |\, 0^3 \end{align}$$I then sought to discover what other numbers in the range up to 40,000 have this property. It turns out that there are 78 such numbers and they are (permalink):

108, 180, 801, 810, 1027, 1064, 1270, 1278, 1640, 1648, 1827, 1864, 2701, 2708, 2710, 2718, 2780, 2781, 6401, 6408, 6410, 6418, 6480, 6481, 8027, 8064, 8127, 8164, 8270, 8271, 8640, 8641, 10125, 10216, 10343, 10512, 10729, 11250, 11258, 12160, 12168, 12501, 12508, 12510, 12518, 12580, 12581, 12764, 13430, 13438, 15120, 15128, 16427, 17290, 17298, 18125, 18216, 18343, 18512, 18729, 21601, 21608, 21610, 21618, 21680, 21681, 27064, 27164, 27640, 27641, 27648, 27864, 34301, 34308, 34310, 34318, 34380, 34381

Let's take the last member of the above set:$$ \begin{align} 34381 &= 343 \, | \, 8 \, | \, 1\\ & =7^3 \, | \, 2^3 \, | \, 1^3 \end{align} $$It can be noted that 27640 and 27641 form a pair of consecutive numbers sharing this same property. In the range up to 40,000 this pairing occurs as shown:

  • 2780 and 2781
  • 6480 and 6481
  • 8270 and 8271
  • 8640 and 8641
  • 12580 and 12581
  • 21680 and 21681
  • 27640 and 27641
  • 34380 and 34381
If instead of cubes, we consider squares and instead of triples we consider doubles then we have the following 557 numbers in the range up to 40,000 (permalink):

10, 14, 19, 40, 41, 49, 90, 91, 94, 116, 125, 136, 149, 160, 161, 164, 164, 169, 181, 250, 251, 254, 259, 360, 361, 364, 369, 416, 425, 436, 449, 464, 481, 490, 491, 494, 499, 640, 641, 644, 649, 810, 811, 814, 819, 916, 925, 936, 949, 964, 981, 1000, 1001, 1004, 1009, 1100, 1121, 1144, 1169, 1196, 1210, 1211, 1214, 1219, 1225, 1256, 1289, 1324, 1361, 1400, 1440, 1441, 1441, 1444, 1449, 1484, 1529, 1576, 1625, 1625, 1636, 1649, 1664, 1676, 1681, 1690, 1691, 1694, 1699, 1729, 1784, 1841, 1900, 1960, 1961, 1961, 1964, 1969, 2250, 2251, 2254, 2259, 2516, 2536, 2549, 2560, 2561, 2564, 2564, 2569, 2581, 2890, 2891, 2894, 2899, 3240, 3241, 3244, 3249, 3610, 3611, 3614, 3616, 3619, 3625, 3649, 3664, 3681, 4000, 4001, 4004, 4009, 4100, 4121, 4144, 4169, 4196, 4225, 4256, 4289, 4324, 4361, 4400, 4410, 4411, 4414, 4419, 4441, 4484, 4529, 4576, 4625, 4676, 4729, 4784, 4840, 4841, 4841, 4844, 4849, 4900, 4916, 4925, 4936, 4961, 4964, 4981, 5290, 5291, 5294, 5299, 5760, 5761, 5764, 5769, 6250, 6251, 6254, 6259, 6416, 6425, 6436, 6449, 6481, 6760, 6761, 6764, 6769, 7290, 7291, 7294, 7299, 7840, 7841, 7844, 7849, 8116, 8125, 8136, 8149, 8164, 8410, 8411, 8414, 8419, 9000, 9001, 9004, 9009, 9100, 9121, 9144, 9169, 9196, 9225, 9256, 9289, 9324, 9361, 9400, 9441, 9484, 9529, 9576, 9610, 9611, 9614, 9619, 9625, 9676, 9729, 9784, 9841, 9900, 9961, 10016, 10025, 10036, 10049, 10064, 10081, 10240, 10241, 10244, 10249, 10890, 10891, 10894, 10899, 11024, 11089, 11156, 11225, 11296, 11369, 11444, 11521, 11560, 11561, 11564, 11569, 11600, 11681, 11764, 11849, 11936, 12025, 12116, 12116, 12125, 12136, 12149, 12164, 12181, 12209, 12250, 12251, 12254, 12259, 12304, 12401, 12500, 12601, 12704, 12809, 12916, 12960, 12961, 12964, 12969, 13025, 13136, 13249, 13364, 13481, 13600, 13690, 13691, 13694, 13699, 13721, 13844, 13969, 14096, 14225, 14356, 14416, 14425, 14436, 14440, 14441, 14444, 14449, 14449, 14464, 14481, 14489, 14624, 14761, 14900, 15041, 15184, 15210, 15211, 15214, 15219, 15329, 15476, 15625, 15776, 15929, 16000, 16001, 16004, 16009, 16084, 16100, 16121, 16144, 16169, 16196, 16225, 16241, 16256, 16289, 16324, 16361, 16400, 16400, 16441, 16484, 16529, 16561, 16576, 16625, 16676, 16724, 16729, 16784, 16810, 16811, 16814, 16819, 16841, 16889, 16900, 16916, 16925, 16936, 16949, 16961, 16964, 16981, 17056, 17225, 17396, 17569, 17640, 17641, 17644, 17649, 17744, 17921, 18100, 18281, 18464, 18490, 18491, 18494, 18499, 18649, 18836, 19025, 19216, 19360, 19361, 19364, 19369, 19409, 19604, 19616, 19625, 19636, 19649, 19664, 19681, 19801, 20250, 20251, 20254, 20259, 21160, 21161, 21164, 21169, 22090, 22091, 22094, 22099, 22516, 22525, 22536, 22549, 22564, 22581, 23040, 23041, 23044, 23049, 24010, 24011, 24014, 24019, 25000, 25001, 25004, 25009, 25100, 25121, 25144, 25169, 25196, 25225, 25256, 25289, 25324, 25361, 25400, 25441, 25484, 25529, 25576, 25616, 25625, 25625, 25636, 25649, 25664, 25676, 25681, 25729, 25784, 25841, 25900, 25961, 26010, 26011, 26014, 26019, 27040, 27041, 27044, 27049, 28090, 28091, 28094, 28099, 28916, 28925, 28936, 28949, 28964, 28981, 29160, 29161, 29164, 29169, 30250, 30251, 30254, 30259, 31360, 31361, 31364, 31369, 32416, 32425, 32436, 32449, 32464, 32481, 32490, 32491, 32494, 32499, 33640, 33641, 33644, 33649, 34810, 34811, 34814, 34819, 36000, 36001, 36004, 36009, 36100, 36116, 36121, 36125, 36136, 36144, 36149, 36164, 36169, 36181, 36196, 36225, 36256, 36289, 36324, 36361, 36400, 36441, 36484, 36529, 36576, 36625, 36676, 36729, 36784, 36841, 36900, 36961, 37210, 37211, 37214, 37219, 38440, 38441, 38444, 38449, 39690, 39691, 39694, 39699

Let's take the last number in the above set of numbers:$$ \begin{align} 39699 &= 3969 \, | \, 9 \\ &= 63^2 \, | \, 3^2 \end{align}$$One more example is:$$ \begin{align} 36000 &= 3600 \, | \, 0 \\ &= 60^2 \, | \, 0^2 \end{align} $$There are obviously many other variation on these themes but that will suffice for now.

Monday, 25 November 2024

Fermat Near Misses Revisited

On the 10th of December 2022, almost two years ago now, I made a post titled Fermat Near Misses where I wrote:

I was surprised to find that my diurnal age today, 26914, is part of a triple of numbers that almost satisfies the equation \(x^3+y^3=z^3\) and hence the term "Fermat near misses". There are of course no positive integer solutions to this equation but some solutions only miss out by 1.

For example, the triplet of numbers 9, 10 and 12 satisfy \(x^3+y^3=z^3+1\) where \(x=9\), \(y=10\) and \(z=12\):$$9^3+10^3=12^3+1=1729$$Here 1729 is the famous "taxi cab number". Today, the number associated with my diurnal age is 27630 and it has a property that qualifies it for membership in OEIS A050789:

A050789: consider the Diophantine equation \(x^3+y^3=z^3-1\) or 'Fermat near misses'. The values of \(z\) (see A050787) are arranged in monotonically increasing order. Sequence gives values of \(y\).

So we have:$$17328^3 +27630^3 = 29737^3-1 = 26296107018552$$The sequence begins as follows:

8, 138, 138, 426, 486, 720, 823, 812, 1207, 2292, 2820, 3230, 5610, 5984, 6702, 8675, 11646, 11903, 16806, 17328, 21588, 24965, 27630, 36840, 31212, 37887, 33857, 34566, 49409, 46212, 59022, 66198, 66167, 56503, 69479, 64165, 78244, 89970

Notice how 17328 reappears again, not as an \(x\) value, but as a \(y\) value:$$10866^3+ 17328^3 =18649^3-1 = 6485846213448$$Figure 1 shows the values of \(x\), \(y\) and \(z\) that satisfy these near misses:

Figure 1: permalink

Here is a sorted list of all the initial integers that are involved in these near misses, in other words all the \(x\)'s, \(y\)'s and \(z\)'s together.

6, 8, 9, 71, 135, 138, 144, 172, 236, 242, 372, 426, 486, 505, 566, 575, 577, 720, 729, 791, 812, 823, 904, 1010, 1124, 1207, 1210, 1851, 1938, 1943, 2196, 2292, 2304, 2676, 2820, 3086, 3097, 3230, 3318, 3453, 3753, 4607, 5610, 5625, 5984, 6081, 6560, 6702, 6756, 7251, 7676, 8675, 8703, 8999, 10230, 10866, 11646, 11664, 11903, 12884, 15218, 16806, 16849, 17328, 17384, 18649, 21588, 21609, 24965, 24987, 25765, 27630, 28182, 29196, 29737, 31212, 32882, 33857, 34199, 34566, 36840, 36864, 37513, 37887, 38134, 38239, 41545, 46212, 49409, 49461, 51293, 51762, 54101, 56503, 58462, 59022, 59049, 64165, 66167, 66198, 66465, 68010, 69479, 69709, 71852, 73627, 75263, 78244, 78529, 89970

Saturday, 27 July 2024

Special Sums of Squares

There are many positive integers \(n\) with the property that:$$n=x^2+y^2$$where \(x\) and \(y\) are integers but how frequent are integers with the additional property that \(x\) and \(y\) are both different but share the same digits. The first example of such a number is:$$585 = 12^2+ 21^2$$In fact, up to 40000, there are 51 such numbers. They are:

585, 1130, 1553, 1877, 2340, 2826, 3005, 3329, 3977, 4034, 4520, 4941, 5265, 5330, 5913, 6212, 6698, 6885, 7361, 7508, 7685, 8333, 8642, 8874, 9305, 9360, 10170, 10265, 10589, 11237, 12020, 12506, 13653, 13977, 15650, 17525, 22301, 24804, 27185, 27509, 29930, 30416, 32553, 32877, 33525, 35540, 36026, 36836, 38405, 38729, 39377

Here is a permalink that will generate these numbers and their factorisations. The sequence is not listed in the OEIS. I was drawn to investigate the frequency of these sorts of numbers because the number associated with my diurnal age today, 27509, has this property:$$27509=103^2+130^2$$The number also has the property that the difference of 130 and 103 is 27, a cube, and this qualifies the number for membership of OEIS  A282405:


 A282405



Primes \(p = x^2 + y^2\) such that \(x - y \) is a cube greater than one.



The initial members of the sequence are (permalink):

977, 1049, 1289, 1877, 2477, 2609, 3329, 4877, 5669, 6089, 6977, 8429, 9209, 9749, 10589, 12377, 12689, 13649, 15329, 15877, 16657, 17477, 18617, 18913, 19213, 20773, 21377, 21757, 22093, 22433, 22777, 23833, 23909, 25229, 25673, 26053, 26437, 27509, 30497

The first member of this sequence, 977, has the property that:$$ 977=31^2+4^2\\ \text{where } 31-4=27=3^3$$Of course, the difference need not be a cubic number. It could be a square number. In such case, the numbers belong to OEIS A282406:


 A282406

Primes \(p = x^2 + y^2\) such that \(x - y\) is a square greater than one.



The first member of the sequence is 101 with the property that:$$101=10^2-1^2\\ \text{where }10 -1 = 9 =3^2$$This sequence of numbers in not in the OEIS. The 152 initial numbers, up to 40000, are (permalink):

101, 353, 461, 521, 653, 677, 733, 857, 881, 997, 1153, 1237, 1553, 1613, 1901, 2053, 2153, 2297, 2557, 2693, 2713, 2833, 3061, 3313, 3433, 3581, 3593, 4001, 4013, 4273, 4481, 4637, 4813, 5413, 5981, 6037, 6101, 6301, 6473, 6653, 7121, 7393, 7793, 7853, 7877, 8377, 8521, 8893, 9013, 9157, 9221, 9521, 9697, 9781, 9973, 10253, 10313, 10601, 10861, 11093, 11117, 12301, 12601, 12637, 12941, 12953, 13001, 13597, 13841, 14321, 14593, 14813, 15277, 15641, 15901, 16061, 16333, 16421, 16433, 16693, 16981, 17581, 18313, 18553, 18593, 19301, 19333, 19441, 19661, 19717, 19841, 19961, 20113, 20393, 21001, 21401, 21521, 21601, 21737, 21881, 22153, 22573, 23041, 23081, 23857, 24733, 25121, 25541, 25561, 25621, 26261, 26393, 26513, 26993, 27457, 27653, 27701, 28813, 28901, 29501, 29581, 29761, 29837, 30241, 30661, 30817, 30893, 31393, 31541, 31741, 32141, 32321, 32633, 33581, 33713, 34781, 34897, 35153, 36313, 36493, 36541, 36761, 36821, 37853, 38261, 38321, 38393, 38677, 38821, 39233, 39461, 39521

The algorithm is easily modified to accommodate other roots. We need not restrict ourselves to differences. What about sums? Let's consider:

Primes \(p = x^2 + y^2\) such that \(x + y\) is a square greater than one.

The first example of such a number is:$$53=2^2+7^2\\ \text{where }2+7=9=3^2$$There are 83 such numbers in the range up to 40000. They are (permalink):

53, 317, 337, 353, 373, 397, 457, 577, 1213, 1381, 1621, 2213, 3461, 3593, 3701, 3761, 4481, 4793, 5021, 5393, 5801, 7333, 7433, 7541, 7741, 7933, 8081, 8161, 8521, 9181, 9433, 10133, 10601, 11833, 12421, 13933, 14293, 14321, 14341, 14401, 14461, 14593, 15121, 15581, 16141, 16661, 17093, 17401, 18793, 19181, 19381, 19793, 20441, 21601, 22093, 22861, 24793, 25373, 25457, 25577, 25733, 25793, 25997, 26153, 26237, 26293, 26417, 26513, 26717, 26921, 27241, 27893, 28277, 28433, 29453, 31253, 32633, 33377, 33893, 34157, 35537, 36713, 38273

Similarly we could consider numbers such as:

Primes \(p = x^2 + y^2\) such that \(x + y \) is a cube greater than one.

The first example of such a prime is:$$389=10^2+17^2\\ \text{where }10+17=27=3^3$$The sequence of such numbers is not in the OEIS. There are 27 such numbers in the range up to 40000. They are (permalink):

389, 449, 509, 677, 7817, 7853, 7873, 7993, 8233, 8293, 8573, 8737, 9013, 9437, 10193, 10333, 10477, 11093, 11257, 11597, 11953, 12517, 12713, 13537, 14197, 14657, 15377


Saturday, 9 September 2023

A Special Number Plate

Last night I noticed an unusual car number plate. It was 432 432.  This is a customised number plates as standard number plates follow an AAA 000 pattern, that is three uppercase letters followed by three digits. Presumably the number 432 was of some significance to the person who purchased the plates. This got me thinking about what is special about the number 432.

432 432

PROPERTY 1

The first property of interest is that it's wedged between two prime numbers: 431 and 433. Thus we have:$$432 = \frac{431+433}{2}$$This qualifies it for membership in OEIS A014574:


 A014574

Average of twin prime pairs.                                                    



The initial members of this sequence are:

4, 6, 12, 18, 30, 42, 60, 72, 102, 108, 138, 150, 180, 192, 198, 228, 240, 270, 282, 312, 348, 420, 432, 462, 522, 570, 600, 618, 642, 660, 810, 822, 828, 858, 882, 1020, 1032, 1050, 1062, 1092, 1152, 1230, 1278, 1290, 1302, 1320, 1428, 1452, 1482, 1488, 1608

PROPERTY 2

The next property of interest is that it's the sum of two cubes. Specifically:$$432=6^3+6^3$$This property qualifies it for membership in OEIS A003325:


 A003325

Numbers that are the sum of 2 positive cubes.                        



The initial members of this sequence are:

2, 9, 16, 28, 35, 54, 65, 72, 91, 126, 128, 133, 152, 189, 217, 224, 243, 250, 280, 341, 344, 351, 370, 407, 432, 468, 513, 520, 539, 559, 576, 637, 686, 728, 730, 737, 756, 793, 854, 855, 945, 1001, 1008, 1024, 1027, 1064, 1072, 1125, 1216, 1241, 1332, 1339, 1343

PROPERTY 3

The next property is that it's the sum of the totients of the first 37 numbers: $$432=\sum_{n=1}^{37} \phi(n)$$This qualifies it for membership in OEIS A002088:


 
 A002088

Sum of totient function: \( \displaystyle{\text{a}(n) = \sum_{k=1}^n \phi(k) } \) 
              


The initial members of the sequence are:

0, 1, 2, 4, 6, 10, 12, 18, 22, 28, 32, 42, 46, 58, 64, 72, 80, 96, 102, 120, 128, 140, 150, 172, 180, 200, 212, 230, 242, 270, 278, 308, 324, 344, 360, 384, 396, 432, 450, 474, 490, 530, 542, 584, 604, 628, 650, 696, 712, 754, 774, 806, 830, 882, 900, 940, 964

PROPERTY 4
  
Another property makes it a member of OEIS A033833:


 A033833

Highly factorizable numbers: numbers with a record number of proper factorizations.


432 turns out to have 56 possible factors which are:

[2, 2, 2, 2, 3, 3, 3], [2, 2, 2, 2, 3, 9], [2, 2, 2, 2, 27], [2, 2, 2, 3, 3, 6], [2, 2, 2, 3, 18], [2, 2, 2, 6, 9], [2, 2 , 2, 54], [2, 2, 3, 3, 3, 4], [2, 2, 3, 3, 12], [2, 2, 3, 4, 9], [2, 2, 3, 6, 6], [2, 2, 3, 36], [2, 2, 4, 27], [2, 2, 6, 18], [2, 2, 9, 12], [2, 2, 108], [2, 3, 3, 3, 8], [2, 3, 3, 4, 6], [2, 3, 3, 24], [2, 3, 4, 18], [2, 3, 6, 12], [2, 3, 8, 9], [2, 3, 72], [ 2, 4, 6, 9], [2, 4, 54], [2, 6, 6, 6], [2, 6, 36], [2, 8, 27], [2, 9, 4], [2, 12, 18], [2, 216], [3, 3, 3, 4, 4], [3, 3, 3, 16], [3, 3, 4, 12], [3, 3, 6, 8], [3, 3, 48], [3, 4, 4, 9], [3, 4, 6, 6], [3, 4, 36], [3, 6, 24], [3, 8, 18], [3, 9, 16], [3, 12, 12], [3, 144], [4, 4, 27], [4, 6, 18], [4, 9, 12], [4, 108], [6, 6, 12], [6, 8, 9], [6, 72], [8, 54], [9, 48], [12, 36], [16, 27], [18, 24]

It can be noted that 666 makes its appearance since 432 = 2 x 6 x 6 x 6.

The initial members of the sequence are:

1, 4, 8, 12, 16, 24, 36, 48, 72, 96, 120, 144, 192, 216, 240, 288, 360, 432, 480, 576, 720, 960, 1080, 1152, 1440, 2160, 2880, 4320, 5040, 5760, 7200, 8640, 10080, 11520, 12960, 14400, 15120, 17280, 20160, 25920, 28800, 30240, 34560

PROPERTY 5

Another property of 432 is that it's the difference between the squares of two successive primes. Specifically$$ \begin{align} 432&=109^2-107^2\\&=(109+107) \times (109-107)\\&=216 \times 2\\ &=2^4 \times 3^3 \end{align} $$This qualifies 432 for inclusion in OEIS A069482:


 A069482

a(\(n\)) = (prime(\(n\)+1))\(^2\) - (prime(\(n\)))\(^2\)                                



The initial members of the sequence are:

5, 16, 24, 72, 48, 120, 72, 168, 312, 120, 408, 312, 168, 360, 600, 672, 240, 768, 552, 288, 912, 648, 1032, 1488, 792, 408, 840, 432, 888, 3360, 1032, 1608, 552, 2880, 600, 1848, 1920, 1320, 2040, 2112, 720, 3720, 768, 1560, 792, 4920, 5208, 1800, 912, 1848

I'll stop there as I think I've shown that 432 has at least five interesting properties but of course there are many more. There are actually 4018 entries for this number in the OEIS.

Monday, 17 July 2023

Fusing Mathematics and Artificial Intelligence

Today I turned 27133 days old and one of this number's interesting properties is that it can be represented as a sum of two, three, four and five cubes and in more than one way in some cases. Specifically we can write: $$ \begin{align} 27133 &= 2744+24389\\&=14^3+29^3\\27133 &= 8+125+27000\\&=2^3+5^3+30^3\\27133&=1331+2744+3375+19683\\&=11^3+14^3+15^3+27^3\\27133&=8+8+1000+1728+24389\\&=2^3+2^3+10^3+12^3+29^3\\27133 &= 8+27+512+2197+24389\\&=2^3+3^3+8^3+13^3+29^3\\27133 &= 8+125+3375+8000+15625\\&=2^3+5^3+15^3+20^3+25^3\\27133 &= 125+4096+4913+5832+12167\\&=5^3+16^3+17^3+18^3+23^3\\27133&=216+3375+3375+8000+12167\\&=6^3+15^3+15^3+20^3+23^3 \end{align}$$This is all well and good but visually it's hardly exciting. What I'd like to be able to do is to create an octagonal balance with the eight cubes sitting at the ends of the eight arms. This would have some visual impact I'm sure.


Figure 1



Figure 2

Figures 1 and 2 are a start but how are the twin arms of the traditional scales in Figure 1 transformed into eight arms or four twin arms? How can all the cubes from \(2^3\) to \(30^3\) be represented in proportion, as is partially done in Figure2, and placed on the scales? It could be done with a lot of time and effort using traditional methods but how well will AI perform. 

Here are the directions I gave to DALL-E and Figure 3 shows the four results:

Draw a set of scales with eight arms instead of the traditional two and have cubes of various sizes placed at the ends of the arms so that they roughly balance.


Figure 3

As can be seen the results are not impressive. Here is a second prompt that I gave it and Figure 4 shows the results:

Octopus balancing cubes of various sizes at the end of each of its tentacles.

Figure 4

Again the results are unimpressive but I tried again with the following prompt and figure 5 shows the results:

A weighing machine has eight arms formed from four intersecting metal rods. There are pans at the end of each arm on which to place items to be weighed. In this case, the pans contain a variety of multicolored cubes of various sizes that roughly balance one another. 


Figure 5

Despite the very specific instructions the program wasn't up to the task. Figure 6 shows what NightCafe came up with using the same prompt as before:


Figure 6

I guess this is slightly better but it's still far short of what I want. Figure 7 is what starryai came up with:


Figure 7

Nope. DeepAI came up with the image shown in Figure 8.


Figure 8

I should refine my prompts further of course when using these tools but I was just interested in seeing what the initial outputs would be. Bard, Google's AI, now has the ability to display and import images (see my post Bard). It could not display my eight-armed scale as describe below:
Can you find an image of a scale for weighing that has eight trays instead of the traditional two, arranged evenly in a circle, so as to resemble the arms of an octopus.

There is no image of a scale for weighing that has eight trays instead of the traditional two, arranged evenly in a circle, so as to resemble the arms of an octopus.

The reason for this is that octopus scales are not designed for weighing. They are actually used for detecting motion and orientation. The eight arms of an octopus are covered in tiny suckers, and each sucker has a small sensor that can detect changes in pressure. This allows the octopus to sense the movement of its environment and to maintain its balance.

A scale that has eight trays would be very difficult to use for weighing. The trays would have to be very small, and it would be difficult to keep them evenly balanced. Additionally, the scale would be very sensitive to vibrations, which would make it difficult to get accurate readings.

So, while it is possible to imagine a scale that has eight trays, it is not practical or useful. Octopus scales are simply not designed for weighing.

However, Bard was more forthcoming with this straightforward request:

Can you find an image of an octahedron with the formula for its volume displayed. 

Sure, I found you an image of an octahedron with the formula for its volume displayed. 

The formula for the volume of an octahedron is:

Volume = (√2/3) * a^3

where a is the side length of the octahedron.

The octahedron is a three-dimensional shape with eight faces, each of which is an equilateral triangle. The volume of an octahedron is equal to one-third the volume of a regular tetrahedron with the same side length.

The site proved quite useful and so Bard can be used for finding mathematical content on the Internet, unlike ChatGPT 3.5 that does not have such access.

Sunday, 9 July 2023

Concatenations of Squares and Cubes

I was surprised that the number associated with my diurnal age today, 27125, didn't show up in the OEIS as a concatenation of two cubes, namely \(3^3\) and \(5^3\). This prompted me to list all numbers of the form \(n^3 \, | \, m^3\) where \(n\) and \(m\) are integers (not necessarly distinct). Here is a permalink to the SageMath code that generates the list up to 40,000 and here is the list:

11, 18, 81, 88, 127, 164, 271, 278, 641, 648, 827, 864, 1125, 1216, 1251, 1258, 1343, 1512, 1729, 2161, 2168, 2727, 2764, 3431, 3438, 5121, 5128, 6427, 6464, 7291, 7298, 8125, 8216, 8343, 8512, 8729, 10001, 10008, 11000, 11331, 11728, 12197, 12527, 12564, 12744, 13311, 13318, 13375, 14096, 14913, 15832, 16859, 17281, 17288, 18000, 19261, 21627, 21664, 21971, 21978, 27125, 27216, 27343, 27441, 27448, 27512, 27729, 33751, 33758, 34327, 34364

Some are more difficult to spot than others. What about concatenations of square numbers? Here is a permalink to the SageMath code that generates a list of numbers up to 40,000 and here is the list of numbers of the form  \(n^2 \, | \, m^2\) where \(n\) and \(m\) are integers (not necessarly distinct):

11, 14, 19, 41, 44, 49, 91, 94, 99, 116, 125, 136, 149, 161, 164, 169, 181, 251, 254, 259, 361, 364, 369, 416, 425, 436, 449, 464, 481, 491, 494, 499, 641, 644, 649, 811, 814, 819, 916, 925, 936, 949, 964, 981, 1001, 1004, 1009, 1100, 1121, 1144, 1169, 1196, 1211, 1214, 1219, 1225, 1256, 1289, 1324, 1361, 1400, 1441, 1444, 1449, 1484, 1529, 1576, 1616, 1625, 1636, 1649, 1664, 1676, 1681, 1691, 1694, 1699, 1729, 1784, 1841, 1900, 1961, 1964, 1969, 2251, 2254, 2259, 2516, 2525, 2536, 2549, 2561, 2564, 2569, 2581, 2891, 2894, 2899, 3241, 3244, 3249, 3611, 3614, 3616, 3619, 3625, 3636, 3649, 3664, 3681, 4001, 4004, 4009, 4100, 4121, 4144, 4169, 4196, 4225, 4256, 4289, 4324, 4361, 4400, 4411, 4414, 4419, 4441, 4484, 4529, 4576, 4625, 4676, 4729, 4784, 4841, 4844, 4849, 4900, 4916, 4925, 4936, 4949, 4961, 4964, 4981, 5291, 5294, 5299, 5761, 5764, 5769, 6251, 6254, 6259, 6416, 6425, 6436, 6449, 6464, 6481, 6761, 6764, 6769, 7291, 7294, 7299, 7841, 7844, 7849, 8116, 8125, 8136, 8149, 8164, 8181, 8411, 8414, 8419, 9001, 9004, 9009, 9100, 9121, 9144, 9169, 9196, 9225, 9256, 9289, 9324, 9361, 9400, 9441, 9484, 9529, 9576, 9611, 9614, 9619, 9625, 9676, 9729, 9784, 9841, 9900, 9961, 10016, 10025, 10036, 10049, 10064, 10081, 10241, 10244, 10249, 10891, 10894, 10899, 11024, 11089, 11156, 11225, 11296, 11369, 11444, 11521, 11561, 11564, 11569, 11600, 11681, 11764, 11849, 11936, 12025, 12116, 12125, 12136, 12149, 12164, 12181, 12209, 12251, 12254, 12259, 12304, 12401, 12500, 12601, 12704, 12809, 12916, 12961, 12964, 12969, 13025, 13136, 13249, 13364, 13481, 13600, 13691, 13694, 13699, 13721, 13844, 13969, 14096, 14225, 14356, 14416, 14425, 14436, 14441, 14444, 14449, 14464, 14481, 14489, 14624, 14761, 14900, 15041, 15184, 15211, 15214, 15219, 15329, 15476, 15625, 15776, 15929, 16001, 16004, 16009, 16084, 16100, 16121, 16144, 16169, 16196, 16225, 16241, 16256, 16289, 16324, 16361, 16400, 16441, 16484, 16529, 16561, 16576, 16625, 16676, 16724, 16729, 16784, 16811, 16814, 16819, 16841, 16889, 16900, 16916, 16925, 16936, 16949, 16961, 16964, 16981, 17056, 17225, 17396, 17569, 17641, 17644, 17649, 17744, 17921, 18100, 18281, 18464, 18491, 18494, 18499, 18649, 18836, 19025, 19216, 19361, 19364, 19369, 19409, 19604, 19616, 19625, 19636, 19649, 19664, 19681, 19801, 20251, 20254, 20259, 21161, 21164, 21169, 22091, 22094, 22099, 22516, 22525, 22536, 22549, 22564, 22581, 23041, 23044, 23049, 24011, 24014, 24019, 25001, 25004, 25009, 25100, 25121, 25144, 25169, 25196, 25225, 25256, 25289, 25324, 25361, 25400, 25441, 25484, 25529, 25576, 25616, 25625, 25636, 25649, 25664, 25676, 25681, 25729, 25784, 25841, 25900, 25961, 26011, 26014, 26019, 27041, 27044, 27049, 28091, 28094, 28099, 28916, 28925, 28936, 28949, 28964, 28981, 29161, 29164, 29169, 30251, 30254, 30259, 31361, 31364, 31369, 32416, 32425, 32436, 32449, 32464, 32481, 32491, 32494, 32499, 33641, 33644, 33649, 34811, 34814, 34819, 36001, 36004, 36009, 36100, 36116, 36121, 36125, 36136, 36144, 36149, 36164, 36169, 36181, 36196, 36225, 36256, 36289, 36324, 36361, 36400, 36441, 36484, 36529, 36576, 36625, 36676, 36729, 36784, 36841, 36900, 36961, 37211, 37214, 37219, 38441, 38444, 38449, 39691, 39694, 39699

We can thin the above list of numbers by requiring that the number formed by the concatenation be a square number (permalink):

49, 169, 361, 1225, 1444, 1681, 3249, 4225, 4900, 15625, 16900, 36100

Here we see that \(36100 = 6^2 \, | \, 10^2 = 190^2 \).

While we're at it, let's consider concatenations of fourth powers. Here is a list (permalink) of numbers of the form \(n^4 \, | \, m^4\) where \(n\) and \(m\) are integers (not necessarly distinct):

11, 116, 161, 181, 811, 1256, 1616, 1625, 1681, 2561, 6251, 8116, 8181, 11296, 12401, 12961, 14096, 16256, 16561, 16625, 24011, 25616, 25681

We don't have to limit ourselves to concatenations of pairs of powers. We can concatenate three powers as easily as two. Let's consider numbers that are a concatenation of three square numbers (permalink):

111, 114, 119, 141, 144, 149, 191, 194, 199, 411, 414, 419, 441, 444, 449, 491, 494, 499, 911, 914, 919, 941, 944, 949, 991, 994, 999, 1116, 1125, 1136, 1149, 1161, 1164, 1169, 1181, 1251, 1254, 1259, 1361, 1364, 1369, 1416, 1425, 1436, 1449, 1464, 1481, 1491, 1494, 1499, 1611, 1614, 1619, 1641, 1644, 1649, 1691, 1694, 1699, 1811, 1814, 1819, 1916, 1925, 1936, 1949, 1964, 1981, 2511, 2514, 2519, 2541, 2544, 2549, 2591, 2594, 2599, 3611, 3614, 3619, 3641, 3644, 3649, 3691, 3694, 3699, 4116, 4125, 4136, 4149, 4161, 4164, 4169, 4181, 4251, 4254, 4259, 4361, 4364, 4369, 4416, 4425, 4436, 4449, 4464, 4481, 4491, 4494, 4499, 4641, 4644, 4649, 4811, 4814, 4819, 4911, 4914, 4916, 4919, 4925, 4936, 4941, 4944, 4949, 4964, 4981, 4991, 4994, 4999, 6411, 6414, 6419, 6441, 6444, 6449, 6491, 6494, 6499, 8111, 8114, 8119, 8141, 8144, 8149, 8191, 8194, 8199, 9116, 9125, 9136, 9149, 9161, 9164, 9169, 9181, 9251, 9254, 9259, 9361, 9364, 9369, 9416, 9425, 9436, 9449, 9464, 9481, 9491, 9494, 9499, 9641, 9644, 9649, 9811, 9814, 9819, 9916, 9925, 9936, 9949, 9964, 9981, 10011, 10014, 10019, 10041, 10044, 10049, 10091, 10094, 10099, 11001, 11004, 11009, 11100, 11121, 11144, 11169, 11196, 11211, 11214, 11219, 11225, 11256, 11289, 11324, 11361, 11400, 11441, 11444, 11449, 11484, 11529, 11576, 11616, 11625, 11636, 11649, 11664, 11676, 11681, 11691, 11694, 11699, 11729, 11784, 11841, 11900, 11961, 11964, 11969, 12111, 12114, 12119, 12141, 12144, 12149, 12191, 12194, 12199, 12251, 12254, 12259, 12516, 12525, 12536, 12549, 12561, 12564, 12569, 12581, 12891, 12894, 12899, 13241, 13244, 13249, 13611, 13614, 13616, 13619, 13625, 13636, 13649, 13664, 13681, 14001, 14004, 14009, 14100, 14121, 14144, 14169, 14196, 14225, 14256, 14289, 14324, 14361, 14400, 14411, 14414, 14419, 14441, 14444, 14449, 14484, 14491, 14494, 14499, 14529, 14576, 14625, 14676, 14729, 14784, 14841, 14844, 14849, 14900, 14916, 14925, 14936, 14949, 14961, 14964, 14981, 15291, 15294, 15299, 15761, 15764, 15769, 16116, 16125, 16136, 16149, 16161, 16164, 16169, 16181, 16251, 16254, 16259, 16361, 16364, 16369, 16416, 16425, 16436, 16449, 16464, 16481, 16491, 16494, 16499, 16641, 16644, 16649, 16761, 16764, 16769, 16811, 16814, 16819, 16911, 16914, 16916, 16919, 16925, 16936, 16941, 16944, 16949, 16964, 16981, 16991, 16994, 16999, 17291, 17294, 17299, 17841, 17844, 17849, 18116, 18125, 18136, 18149, 18164, 18181, 18411, 18414, 18419, 19001, 19004, 19009, 19100, 19121, 19144, 19169, 19196, 19225, 19256, 19289, 19324, 19361, 19400, 19441, 19484, 19529, 19576, 19611, 19614, 19619, 19625, 19641, 19644, 19649, 19676, 19691, 19694, 19699, 19729, 19784, 19841, 19900, 19961, 22511, 22514, 22519, 22541, 22544, 22549, 22591, 22594, 22599, 25116, 25125, 25136, 25149, 25161, 25164, 25169, 25181, 25251, 25254, 25259, 25361, 25364, 25369, 25416, 25425, 25436, 25449, 25464, 25481, 25491, 25494, 25499, 25611, 25614, 25619, 25641, 25644, 25649, 25691, 25694, 25699, 25811, 25814, 25819, 25916, 25925, 25936, 25949, 25964, 25981, 28911, 28914, 28919, 28941, 28944, 28949, 28991, 28994, 28999, 32411, 32414, 32419, 32441, 32444, 32449, 32491, 32494, 32499, 36111, 36114, 36116, 36119, 36125, 36136, 36141, 36144, 36149, 36161, 36164, 36169, 36181, 36191, 36194, 36199, 36251, 36254, 36259, 36361, 36364, 36369, 36416, 36425, 36436, 36449, 36464, 36481, 36491, 36494, 36499, 36641, 36644, 36649, 36811, 36814, 36819, 36916, 36925, 36936, 36949, 36964, 36981

Here we see that \(36981= 6^2 \, | \, 3^2 \, | \,9^2\). Once again, we can thin the above numbers by adding the requirement that the number formed by the concatenation be a square number. In this case, we get (permalink):

144, 441, 1369, 1936, 11449, 11664, 14400, 16641, 36481

Here we see that \(36481=6^2 \, | \, 2^2 \, | \,9^2 = 191^2\). None of these sequences of numbers appear in the OEIS as far as I'm aware and I certainly won't be adding them. So nothing of deep mathematical significance in this post, just playing around with powers of numbers and concatenating them. Of course, I've written about Primes Formed By Concatenation quite recently on June 17th 2023.

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.

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$$ \begin{align} 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 \end{align} $$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).$$ \begin{align} 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 \end{align} $$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.

Sunday, 19 February 2023

Midway Between Cubics and Pronics

Recently I posted about distances to cubic numbers (In the Vicinity of Cubic Numbers) as well as the product of three consecutive integers (Infinite Sums of Reciprocals of Pronic Numbers). These latter numbers are referred to variously as pronic, promic and oblong numbers. The number associated with my diurnal age today, 26985, involves both cubic and pronic numbers and qualifies it for inclusion in OEIS A342873:


 A342873

Numbers whose distance to the nearest cube equals the distance to the nearest product of 3 consecutive integers (three-dimensional oblong).



My approach to generating the terms of this sequence, using SageMath, was to first generate, separately, the sequence of cubic numbers and the sequence of oblong numbers up to a little over 42,000. 

The sequence of 36 cubic numbers (including zero) is:

0, 1, 8, 27, 64, 125, 216, 343, 512, 729, 1000, 1331, 1728, 2197, 2744, 3375, 4096, 4913, 5832, 6859, 8000, 9261, 10648, 12167, 13824, 15625, 17576, 19683, 21952, 24389, 27000, 29791, 32768, 35937, 39304, 42875

The sequence of 36 oblong numbers (including zero) is:

0, 6, 24, 60, 120, 210, 336, 504, 720, 990, 1320, 1716, 2184, 2730, 3360, 4080, 4896, 5814, 6840, 7980, 9240, 10626, 12144, 13800, 15600, 17550, 19656, 21924, 24360, 26970, 29760, 32736, 35904, 39270, 42840, 46620

Combined these two sets of numbers together gives a total of 71 numbers since zero is duplicated:

0, 1, 6, 8, 24, 27, 60, 64, 120, 125, 210, 216, 336, 343, 504, 512, 720, 729, 990, 1000, 1320, 1331, 1716, 1728, 2184, 2197, 2730, 2744, 3360, 3375, 4080, 4096, 4896, 4913, 5814, 5832, 6840, 6859, 7980, 8000, 9240, 9261, 10626, 10648, 12144, 12167, 13800, 13824, 15600, 15625, 17550, 17576, 19656, 19683, 21924, 21952, 24360, 24389, 26970, 27000, 29760, 29791, 32736, 32768, 35904, 35937, 39270, 39304, 42840, 42875, 46620

Fortunately the order of these numbers, after zero, alternates from cubic to oblong and this algorithm was able to be applied in order to identify the numbers that satisfied the criterion imposed by OEIS A342873. These are the resulting numbers up to a little over 40,000:

0, 7, 16, 62, 92, 213, 276, 508, 616, 995, 1160, 1722, 1956, 2737, 3052, 4088, 4496, 5823, 6336, 7990, 8620, 10637, 11396, 13812, 14712, 17563, 18616, 21938, 23156, 26985, 28380, 32752, 34336, 39287, 41072

For example, today's number of 26985 is a distance of 15 from the nearest cubic number (27000 = 30 x 30 x 30) and the same distance from the nearest oblong numbers (26970 = 29 x 30 x 31). 

Had the two sets of numbers become jumbled up when combined, the task of identifying suitable numbers would have been more difficult. However, the oblong numbers \(n \times (n+1) \times (n+2) \) are only a little ahead of corresponding cubic numbers (\(n^3 )\) and so the problem doesn't arise.

To see that the oblong number following the cube is always less than the next cube, consider the following:$$ \begin{align} n  (n+1) (n+2) &=n^3 + 3n^2 + 2n\\(n+1)^3&=n^3+3n^2+3n+1 \end{align}$$Clearly the next cubic number is always \(n+1\) ahead of the oblong number. The same reasoning would apply if we looked at numbers that are equidistant from the nearest square number and the nearest pronic number.

The earlier algorithm is easily modified to produce these numbers that constitute OEIS A074378:


 A074378

Numbers whose distance to nearest square number equals their distance to nearest pronic number.



The modified algorithm generates these numbers:

0, 3, 5, 14, 18, 33, 39, 60, 68, 95, 105, 138, 150, 189, 203, 248, 264, 315, 333, 390, 410, 473, 495, 564, 588, 663, 689, 770, 798, 885, 915, 1008, 1040, 1139, 1173, 1278, 1314, 1425, 1463, 1580, 1620, 1743, 1785, 1914, 1958, 2093, 2139, 2280, 2328, 2475, 2525, 2678, 2730, 2889, 2943, 3108, 3164, 3335, 3393, 3570, 3630, 3813, 3875, 4064, 4128, 4323, 4389, 4590, 4658, 4865, 4935, 5148, 5220, 5439, 5513, 5738, 5814, 6045, 6123, 6360, 6440, 6683, 6765, 7014, 7098, 7353, 7439, 7700, 7788, 8055, 8145, 8418, 8510, 8789, 8883, 9168, 9264, 9555, 9653, 9950, 10050, 10353, 10455, 10764, 10868, 11183, 11289, 11610, 11718, 12045, 12155, 12488, 12600, 12939, 13053, 13398, 13514, 13865, 13983, 14340, 14460, 14823, 14945, 15314, 15438, 15813, 15939, 16320, 16448, 16835, 16965, 17358, 17490, 17889, 18023, 18428, 18564, 18975, 19113, 19530, 19670, 20093, 20235, 20664, 20808, 21243, 21389, 21830, 21978, 22425, 22575, 23028, 23180, 23639, 23793, 24258, 24414, 24885, 25043, 25520, 25680, 26163, 26325, 26814, 26978, 27473, 27639, 28140, 28308, 28815, 28985, 29498, 29670, 30189, 30363, 30888, 31064, 31595, 31773, 32310, 32490, 33033, 33215, 33764, 33948, 34503, 34689, 35250, 35438, 36005, 36195, 36768, 36960, 37539, 37733, 38318, 38514, 39105, 39303, 39900, 40100

For example, the number 14 in this sequence is an equal distance from 12 = 3 x 4 and 16 = 4 x 4. The algorithm could be extended (permalink) the other way to find numbers that are equidistant from the nearest fourth power and the number that is a product of four consecutive integers. The initial resultant numbers are not a part of any OEIS sequence but they are as follows:

0, 20, 188, 308, 1068, 1488, 3560, 4568, 8960, 10940, 18948, 22380, 35588, 41048, 61328, 69488, 99000, 110628, 151820, 167780

For example the number 20 is equidistant from 16 = 2 x 2 x 2 x 2 and 24 = 1 x 2 x 3 x 4. The algorithm could be extended indefinitely but to little purpose. Nonetheless, it's been an interesting exercise.

Wednesday, 15 February 2023

Special Numbers, Special Dates

On the 26th January 2023, I posted about Turning Dates Into Numbers and made the observation that the 10th February 2023 was a special day because the number associated with this date (20230210) had the interesting property that it was the only date in the year that produced a number that had seven distinct prime factors:

20230210 = 2 x 5 x 7 x 11 x 13 x 43 x 47

It turns out that this number has another interesting property in that the sum of its digits equals the last two digits (representing the day of the month). In fact, it begins a run of ten consecutive numbers that end with 20230219 (the 19th February 2023) ... permalink:

20230210, 20230211, 20230212, 20230213, 20230214, 20230215, 20230216, 20230217, 20230218, 20230219

Another run of ten similar numbers occurs in November, starting on the 10th and ending on the 19th.

20231110, 20231111, 20231112, 20231113, 20231114, 20231115, 20231116, 20231117, 20231118, 20231119

For many, many years to come, the sum of the digits of the numbers associated with the dates will always contain two digits. Today is the 15th February 2023 and so we are into the second half of the first-mentioned run.

This number can be expressed as a sum of three cubes
See Figure 2

Similar runs will occur every year but the dates will differ naturally. For example, in 2024, the first run of numbers will begin on 11th January 2024 with 20240111 and end on 19th January 2024 with 20240119. 

In my previous post Turning Dates Into Numbers I looked at what numbers were prime, semiprime and so on. In this post I'll turn my attention to cubes and see what numbers can be expressed as the sum of two cubes and as a sum of three cubes. 

It turns out that there is only one number in the entire year that can be expressed as a sum of two cubes and that is \( 20231020 = 69^3 + 271^3\). This corresponds to the 20th October 2023.

The sums of three cubes are more common. The complete list is shown in Figure 2, arranged in chronological order with 20th January being the first date and 26th December the last.


Figure 2: permalink

It can be noted that some dates produce numbers that can be expressed as sums of three cubes in more than one way. Specifically, 20230426 (two ways), 20230523 (two ways), 20230722 (two ways), 20230904 (two ways), 20230911 (three ways), 20231028 (two ways) and 20231226 (two ways). Thus the 11th September (the famous 911 in United States date format) produces the only number (20230911) that can be expressed as a sum of three cubes in three ways.