Thursday, 15 December 2022

Numbers and Matrices

Suppose we have a number with distinct, non-zero digits. The number associated with my diurnal age, 26918, is one such number. Let's now consider a 3 x 3 matrix with the numbers 1 to 9 positioned as shown in Figure 1:


Figure 1

Let's apply two rules to the digits in the matrix:
  1. if a matrix digit does occur in the number then it is left unchanged 
  2. if the matrix digit does not occur in the number then it is changed to a zero
See Figure 2 for the application of these two rules using 26918 as the number.


Figure 2: determinant is \(-\)48

Using this method, all permutations of the digits of a number will produce the same matrix e.g. 81962 (the reverse of 26918). Next find the determinant of the matrix. In the case of 26918, the determinant is \(-\)48. Does the determinant divide the number? Since 26918 factorises to 2 x 43 x 313, clearly it does not. 

However, there are numbers for which the determinant of its associated matrix does divide the number. Take for example 27468. It produces the matrix shown in Figure 3.


Figure 3: determinant is 84

This matrix has a determinant of 84 and this number appears in the divisors of 27468:

1, 2, 3, 4, 6, 7, 9, 12, 14, 18, 21, 28, 36, 42, 63, 84, 109, 126, 218, 252, 327, 436, 654, 763, 981, 1308, 1526, 1962, 2289, 3052, 3924, 4578, 6867, 9156, 13734, 27468

How many numbers between 1 and 100,000 satisfy this divisibility rule? Well, not many. It turns out that there are only 256 numbers representing a mere 0.265% of the total range. The low number is not surprising as the number must firstly contain distinct non-zero digits and secondly the determinant of its associated matrix must divide the number. Here is the list of the numbers that pass the test:

384, 672, 735, 816, 1395, 1935, 1968, 3168, 3195, 3276, 3648, 3675, 3915, 4392, 6972, 9135, 9168, 9315, 9432, 12384, 12864, 13248, 13824, 13968, 14895, 14985, 15648, 17325, 17568, 17856, 18375, 18432, 18495, 18576, 18624, 18945, 19485, 19845, 21648, 21735, 21756, 24816, 27468, 28416, 28476, 29736, 31584, 31968, 34578, 34587, 34758, 34785, 34857, 34875, 35478, 35487, 35748, 35784, 35847, 35874, 36792, 37248, 37296, 37458, 37485, 37548, 37584, 37695, 37824, 37845, 37854, 38457, 38475, 38496, 38547, 38574, 38745, 38754, 39168, 39648, 41568, 41856, 41895, 41985, 42735, 42756, 42816, 43578, 43587, 43758, 43785, 43857, 43872, 43875, 43968, 45168, 45276, 45378, 45387, 45738, 45783, 45792, 45837, 45873, 46128, 46872, 47328, 47358, 47385, 47538, 47583, 47592, 47628, 47835, 47853, 47952, 48195, 48357, 48375, 48537, 48573, 48735, 48753, 48915, 49185, 49752, 49815, 51648, 53184, 53478, 53487, 53748, 53784, 53847, 53874, 54378, 54387, 54738, 54783, 54792, 54816, 54837, 54873, 57168, 57348, 57384, 57438, 57483, 57624, 57834, 57843, 58176, 58347, 58374, 58416, 58437, 58473, 58734, 58743, 59472, 61248, 61572, 61584, 61824, 62748, 64128, 65184, 67284, 67452, 67935, 71568, 71652, 71856, 72135, 72156, 72345, 72384, 73185, 73248, 73458, 73485, 73548, 73584, 73815, 73824, 73845, 73854, 74235, 74256, 74358, 74385, 74538, 74583, 74592, 74835, 74853, 74952, 75168, 75264, 75348, 75384, 75438, 75483, 75834, 75843, 76524, 78345, 78354, 78432, 78435, 78453, 78534, 78543, 78624, 79632, 81264, 81375, 81456, 81495, 81936, 81945, 82416, 83457, 83475, 83547, 83574, 83745, 83754, 84195, 84357, 84375, 84537, 84573, 84672, 84735, 84753, 84915, 85347, 85374, 85437, 85473, 85734, 85743, 87345, 87354, 87435, 87453, 87534, 87543, 89136, 89145, 89415, 91485, 91845, 92736, 93168, 93765, 94185, 94368, 94752, 94815, 95472, 96384, 98145, 98415

Here is the permalink to these results. This line of investigation was provoked by my inability to find much of interest about the number associated with my diurnal age, 26918. Most of what I found in the OEIS related to obscure properties connected with matrices. Ironically, I was then led to matrices anyway. Unfortunately, my number didn't qualify. 

To my delight however, I discovered that if I took the totient of 26918, which is 13104, then the determinant did divide it. The divisors of 13104 are listed below and it can be seen that 48 is a divisor:

1, 2, 3, 4, 6, 7, 8, 9, 12, 13, 14, 16, 18, 21, 24, 26, 28, 36, 39, 42, 48, 52, 56, 63, 72, 78, 84, 91, 104, 112, 117, 126, 144, 156, 168, 182, 208, 234, 252, 273, 312, 336, 364, 468, 504, 546, 624, 728, 819, 936, 1008, 1092, 1456, 1638, 1872, 2184, 3276, 4368, 6552, 13104

Our previous number, 27468, that was divisible by the determinant of its associated matrix,  has a totient of 7776 and this number is not divisible by the determinant. If we investigate how many numbers have their totients divisible by the determinant then, in the range up to 100,000, there are 2514 numbers that satisfy representing 2.514%. This is about ten times the number for divisibility of the number itself by the determinant. I won't list all the numbers but here is the permalink to the calculation. In the narrow range between 26900 and 27100, there are only two numbers that qualify: 26918 and 26957. 

While we are are considering totients, we may as well consider the sum of the divisors of the number. How many numbers have their sum of divisors divisible by their associated matrix's determinant. Well in the range, up to 100,000, there are 2864 such numbers, a little more than for the totients. Here is the permalink to the calculation. In the narrow range between 26900 and 27100, there are only five such numbers: 26937, 26945, 26974, 26975, 26978.

We can reduce these largish numbers (2514 for totients and 2864 for sum of divisors) by restricting our choice of numbers to primes. In that case, the totient will be one less than the prime number (and thus always composite) and the sum of divisors will be one more than the prime number (and thus always composite). For example, 23 has a totient of 22 and its sum of divisors is 24. 

Applying this restriction, we find that there are 66 prime numbers up to 100,000 that have their sum of divisors divisible by the determinant. This determinant must be non-zero and this is often not the case because even in five digit numbers there will be five zeroes in the matrix (and more in smaller numbers). In summary then, these numbers are not common because they must:
  • be prime
  • have no repeating digits
  • contain no zeroes
  • have a non-zero determinant
  • have a determinant that divides their sum of digits
The numbers are:

1259, 2687, 8543, 13859, 14759, 14783, 15749, 18539, 23687, 25367, 26879, 28439, 29567, 31859, 35279, 37589, 41579, 41759, 42839, 45179, 48239, 49823, 51479, 51749, 51839, 51869, 53189, 53819, 56237, 56891, 57149, 57329, 58169, 58379, 58943, 61487, 61583, 65183, 65981, 68351, 68543, 71549, 74159, 75149, 75389, 78539, 78623, 81359, 81569, 81647, 82463, 83579, 84239, 85439, 85619, 85691, 86351, 86951, 87359, 89561, 89627, 92567, 94823, 96581, 96851, 98561

Let's take 1259 as an example. Its sum of divisors in 1260 which has the following divisors:

1, 2, 3, 4, 5, 6, 7, 9, 10, 12, 14, 15, 18, 20, 21, 28, 30, 35, 36, 42, 45, 60, 63, 70, 84, 90, 105, 126, 140, 180, 210, 252, 315, 420, 630, 1260

The matrix associated with this number has a determinant of 45 and this is one of the divisors. 

For the totients, there are only 50 prime numbers up to 100,000 that have their totients divisible by the determinant. Once again, in summary, these numbers are not common because they must:
  • be prime
  • have no repeating digits
  • contain no zeroes
  • have a non-zero determinant
  • have a determinant that divides their totient
The numbers are:

3571, 4591, 4951, 6217, 6481, 7351, 7681, 8641, 13249, 21673, 24697, 25849, 26497, 26713, 31249, 31489, 34129, 39241, 39841, 42193, 42697, 45289, 47269, 47629, 48193, 48673, 49681, 52489, 59671, 62497, 63841, 65731, 67429, 72469, 72649, 73681, 76249, 79561, 81649, 82561, 82657, 83617, 83761, 84673, 84961, 93241, 94321, 97561, 97651, 98641

Let's take 98641 as an example. The associated matrix determinant is \(-\)48 and the totient is 98640 with divisors shown below (amongst which is the determinant):

1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 24, 30, 36, 40, 45, 48, 60, 72, 80, 90, 120, 137, 144, 180, 240, 274, 360, 411, 548, 685, 720, 822, 1096, 1233, 1370, 1644, 2055, 2192, 2466, 2740, 3288, 4110, 4932, 5480, 6165, 6576, 8220, 9864, 10960, 12330, 16440, 19728, 24660, 32880, 49320, 98640

I've added the three sequences (without the prime stipulation) to my Bespoken for Sequences on Google Docs (Figure 4, Figure 5 and Figure 6):

Figure 4: link

Figure 5: link

Figure 6: link

While these sequences may seem somewhat contrived they pale before some of the bizarre entries in the OEIS. Hence I'm emboldened to describe them here, although I have no intention of submitting them for approval by the venomous OEIS vetting committee. 

THE CIRCULANT MATRIX

If we want to get on a more mainstream connection between numbers and matrices, we need go no further than the circulant matrix which is a square matrix in which each row vector is rotated one element to the right relative to the preceding row vector. Thus a number like 26933 has this associated circulant matrix (see Figure 7):


Figure 7

What's interesting about this particular number is that its determinant is equal to the number itself. Numbers of this sort form OEIS A219324:

 
 A219324

Positive integers n that are equal to the determinant of the circulant matrix formed by the decimal digits of n.



The initial members of the sequence are (permalink for numbers in the range up to 40,000):

1, 2, 3, 4, 5, 6, 7, 8, 9, 247, 370, 378, 407, 481, 518, 592, 629, 1360, 3075, 26027, 26933, 45018, 69781, 80487, 154791, 1920261, 2137616, 2716713, 3100883, 3480140, 3934896, 4179451, 4830936, 5218958, 11955168, 80651025, 95738203, 257059332, 278945612, 456790123, 469135802, 493827160, 494376160

I couldn't help broadening this criterion a little to accommodate the situation in which the determinant does not need to be equal to the number whose digits appear in the first row of the matrix but could be in any row. 25203 is such a number. Let's look at its circulant matrix (see Figure 8):


Figure 8

The determinant of this matrix is 3252 and this number, with a leading zero, appears in the second row. In the range up to 40,000, there are 69 numbers that satisfy including all 21 of the members of OEIS  A219324 in that range (marked in red and here is a permalink):

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 84, 100, 148, 185, 247, 259, 296, 370, 378, 407, 472, 481, 518, 592, 629, 703, 724, 740, 783, 814, 837, 851, 925, 962, 1000, 1360, 3075, 3150, 4002, 5031, 5071, 5471, 6013, 7150, 7154, 7530, 10000, 12054, 14063, 16072, 16978, 18450, 20325, 20541, 20596, 21607, 23035, 25203, 26027, 26933, 27260, 30352, 31406, 32520, 32693, 33269, 33604, 35230, 36043

Let's take one more example, this time 33269 with a circulant matrix as shown in Figure 9.


Figure 9

The determinant of this matrix is 26933 and looking at the matrix more closely we see that it is the same as the matrix shown in Figure 7 except that the top row has now moved to the bottom.  Thus it can be seen that, according to my new criterion, every row number is a member of the sequence in a circulant matrix where any one row number equals the derterminant. Thus 33269 is in the sequence and so too will be 69332 and 93326 (although I've only shown numbers up to 40,000).

Wednesday, 14 December 2022

Two Equations, Two Unknowns and the Beta Function

I spotted this little problem on Twitter (see Figure 1):


Figure 1

The proximity of \(+31\) to \(+32\) should alert us to the possibility that either \(x=+2\) or \(y=+2\) is a solution. After that, the corresponding \(x\) and \(y\) values fall into place. However, let's suppose that we didn't spot this and I have to confess I didn't. In that case, we follow the conventional method. 

At first sight, it looks like you will end up with a quintic equation after substituting \(y=1-x\) into \(x^5+y^5=31\) and there is no general formula for solving quintic equations. However, the \(x^5\) terms cancels out nicely leaving us with a quartic equation. Let's see how:$$\begin{align} x^5+(1-x)^5&=31\\x^5+(1-5x+10x^2-10x^3+5x^4-x^5)&=31\\5x^4-10x^3+10x^2-5x-30&=0\\5x^3(x-2)+5(2x^2-x-6)&=0\\5x^3(x-2)+5(2x+3)(x-2)&=0\\(x-2)(5x^3+10x+15)&=0\\5(x-2)(x^3+2x+3)&=0\\5(x-2)(x+1)(x^2-x+3)&=0 \end{align}$$Thus \(x=2\) and \(y=-1\) or \(x=-1\) and \(y=2\). Using GeoGebra, this can be confirmed visually as shown in Figure 2:


Figure 2

Differentiation reveals a little more about the graph of \(x^5+y^5=31\):$$\begin{align} y'&=\frac{-x^4}{y^4}\\&=-\frac{x^4}{\sqrt[5]{31-x^5}} \end{align} $$It can be seen that \(y'\) is undefined when \(x=\sqrt[5]{31} \approx 1.9873 \) and thus the graph is vertical at this point. If we zoom in a little, this becomes clearer (see Figure 3). There is a point of horizontal inflection when \(x=0\).


Figure 3

This was a useful little exercise as I got to revisit the binomial expansion for \( (a+b)^5\) and the factor theorem in order to factorise \(x^3+2x+3\). Using 1 rather than 31, I was also prompted to consider the area under the curve for \( x^5+y^5 =1\) between 0 and 1. See Figure 4.


Figure 4

In this graph, the vertical tangent occurs at \(x=1\) and this got me thinking about the area under the curve between 0 and 1. In other words, what is the value of:$$ \int_0^1 \sqrt[5]{1-x^5} \, dx$$Using SageMathCell, the integral evaluates to:$$ 0.2 \cdot \beta \! \left (0.2, 1.2 \right )$$Now I vaguely remember coming across a so-called \( \beta \) function that is in some way, I think, related to the \(\Gamma \) function. Further investigation revealed that they are indeed related. In fact:$$ 0.2 \cdot \beta(0.2, 1.2)= 0.2 \cdot \frac{ \Gamma(0.2) \cdot \Gamma(1.2)}{ \Gamma(0.2 +1.2)} \approx 0.950150138988437 $$This result looks about right but what is going on with this \( \beta \) function? Well, the beta function is actually an integral between 0 and 1 involving two different values, let's say \(a\) and \(b\), so that we have:$$\beta(a,b)=\int_0^1 t^{a-1} \cdot (1-t)^{b-1} dt$$If we can get our integral into that form then we can integrate it. Firstly, we make a substitution. Let \(t=x^5\) and so \(dt/dx=5x^4\) and \(dx=0.2 x^{-4}\). We can write \(x^{-4}=t^{-0.8}\) and the integral now transforms into:$$ \begin{array} \displaystyle \displaystyle \int_0^1 \sqrt[5]{1-x^5} \, dx &=\text{0}.2 \displaystyle \int_0^1 t^{-0.8} (1-t)^{0.2} \, dt \\&=0.2 \displaystyle \int_0^1 t^{0.2-1} (1-t)^{1.2-1} \, dt\\&=0.2 \, \beta(0.2,1.2) \end{array} $$So this was quite an interesting post that led me in some unexpected directions. I also was interested in the area between the curves \(x^2+y^2=1\) and \(x^5+y^5=1\) in the range from 0 to 1. See Figure 5 where eq2 is \(x^2+y^2=1\) and the curve \(x^5+y^5=1\) is a tangent to the circle at \(x=0\) and \(x=1\).


Figure 5

Clearly, the area between the two curves from \(x=0 \text{ to }1\) is given by \( \beta(0.2,1.2) - \dfrac{\pi}{4} \). What I've learned from all this is that the \(\beta\) function is a very useful tool to have in one's integration armoury.

Saturday, 10 December 2022

Fermat Near Misses

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. This leads us to OEIS A050792:


 A050792

Consider the Diophantine equation \(x^3 + y^3 = z^3 + 1  \, (1 < x < y < z) \) or 'Fermat near misses'. Arrange solutions by increasing values of \(z\) (see A050791). Sequence gives values of \(x\).



The initial \(x\) values are: 9, 64, 73, 135, 334, 244, 368, 1033, 1010, 577, 3097, 3753, 1126, 4083, 5856, 3987, 1945, 11161, 13294, 3088, 10876, 16617, 4609, 27238, 5700, 27784, 11767, 26914.

The corresponding \(z\) values are given by OEIS A050791:


 A050791

Consider the Diophantine equation \(x^3 + y^3 = z^3 + 1 \, (1 < x < y < z)\) or 'Fermat near misses'. Sequence gives values of \(z\) in monotonic increasing order.



The initial \(z\) values are: 12, 103, 150, 249, 495, 738, 1544, 1852, 1988, 2316, 4184, 5262, 5640, 8657, 9791, 9953, 11682, 14258, 21279, 21630, 31615, 36620, 36888, 38599, 38823, 40362, 41485, 47584.

Given the \(x\) and \(z\) values, we can calculate the corresponding \(y\) values and so the initial \(x,y,z\) triples that satisfy \(x^3 + y^3 = z^3 + 1  \, (1 < x < y < z)\) are:
  • (9, 10, 12)
  • (64, 94, 103)
  • (73, 144, 150)
  • (135, 235, 249)
  • (334, 438, 495)
  • (244, 729, 738)
  • (368, 1537, 1544)
  • (1033, 1738, 1852)
  • (1010, 1897, 1988)
  • (577, 2304, 2316)
  • (3097, 3518, 4184)
  • (3753, 4528, 5262)
  • (1126, 5625, 5640)
  • (4083, 8343, 8657)
  • (5856, 9036, 9791)
  • (3987, 9735, 9953)
  • (1945, 11664, 11682)
  • (11161, 11468, 14258)
  • (13294, 19386, 21279)
  • (3088, 21609, 21630)
  • (10876, 31180, 31615)
  • (16617, 35442, 36620)
  • (4609, 36864, 36888)
  • (27238, 33412, 38599)
  • (5700, 38782, 38823)
  • (27784, 35385, 40362)
  • (11767, 41167, 41485)
  • (26914, 44521, 47584)
Specifically then we have \(26914^3+44521^3=47584^3+1\). The OEIS comments to A050792 are interesting:
Any number of solutions to the equation \(x^3 + y^3 = z^3 + 1\) can be produced through the use of the algebraic identity$$(9t^3+1)^3 + (9t^4)^3 = (9t^4+3t)^3 + 1$$by substituting in values of \(t\). Although these are certainly solutions, the identity generates only one family of solutions. Other solutions such as (64, 94, 103), (135, 235, 249) and (334, 438, 495) can be found. What is not known is if it is possible to parameterize all solutions for this equation. Put another way, are there an infinite number of families of solutions? Probable yes, but that too remains to be shown.
Here are the triples thrown up by the parameterized solutions for values of \(t\) from 1 to 20:
  • [9, 10, 12]
  • [73, 144, 150]
  • [244, 729, 738]
  • [577, 2304, 2316]
  • [1126, 5625, 5640]
  • [1945, 11664, 11682]
  • [3088, 21609, 21630]
  • [4609, 36864, 36888]
  • [6562, 59049, 59076]
  • [9001, 90000, 90030]
  • [11980, 131769, 131802]
  • [15553, 186624, 186660]
  • [19774, 257049, 257088]
  • [24697, 345744, 345786]
  • [30376, 455625, 455670]
  • [36865, 589824, 589872]
  • [44218, 751689, 751740]
  • [52489, 944784, 944838]
  • [61732, 1172889, 1172946] 
  • [72001, 1440000, 1440060]

Thursday, 8 December 2022

Hexagon and Cube

A regular hexagon is a two dimensional polygon with six equal sides while a cube is a three dimensional polyhedron with twelve edges formed by its six sides meeting at right angles.


Represention of 3-D cube


It's only when we see the three dimensional cube represented in two dimensions that the connection with the hexagon is obvious. Here are some more images highlighting the connection between the two.


A cube or hexagon?
The stripes support a 3-D view

Strong 3-D effect created by the central embedded cube


Strong 3-D effect created by multiple embedded cubes


Three hexagons/cubes from nine trapezia



Cube/hexagon embedded in triangular shape


Strong colours produce a striking hexagon/cube ambivalence

That's all there is to this post that simply shows by means of visual examples how the two dimensional regular hexagon and the three dimensional cube merge into each other when viewed from a certain perspective. It occurred to me, while completing this post, that I should consider more posts such as this linking mathematics to visual art (and to other topics as well).

Sums of Squares Pattern

I watched an interesting video that describes a pattern involving sums of squares. The property can be stated as follows:$$n^2+(n+1)^2+n^2 \cdot (n+1)^2 =(n \cdot (n+1)+1)^2\\ \text{where both sides are equal to } n^4 + 2n^3 + 3n^2 + 2n + 1$$The author of the video arrives at the pattern by considering specific numerical examples and doesn't look at the underlying algebra.

The pattern is more meaningful when we look at some specific examples:$$ \begin{align} 1^2+2^2+2^2&=3^2\\2^2+3^2+6^2&=7^2\\3^2+4^2+12^2&=13^2\\4^2+5^2+20^2&=21^2\\5^2+6^2+30^2&=31^2 \end{align}$$Looking at this property the other way, we can say that for any integer \(a\):$$a^2=(a-1)^2+x^2+(x+1)^2$$where \(x\) is an integer such that \(x \cdot (x+1)=a-1\) if such integers exist, which of course will not often be the cause.

However, number of the form \(x \cdot (x+1) \) are pronic and members of OEIS A002378:


 A002378



Oblong (or promic, pronic, or heteromecic) numbers: \(a(n) = n \cdot (n+1) \).   
              

0, 2, 6, 12, 20, 30, 42, 56, 72, 90, 110, 132, 156, 182, 210, 240, 272, 306, 342, 380, 420, 462, 506, 552, 600, 650, 702, 756, 812, 870, 930, 992, 1056, 1122, 1190, 1260, 1332, 1406, 1482, 1560, 1640, 1722, 1806, 1892, 1980, 2070, 2162, 2256, 2352, 2450, 2550, ...

Thus for every number that is one more than a pronic number, there will always be an integer value of \(x\) to satisfy \(a^2=(a-1)^2+x^2+(x+1)^2\). Looking at the list of pronic numbers above, let's take 2550 as an example. We will then have:$$ \begin{align} 2551^2&=2550^2+x^2+(x+1)^2\\x^2+(x+1)^2+2550^2-2551^2 &=0\\x^2+x^2+2x+1 +5101 \cdot (-1) &=0\\2x^2+2x-5100 &=0\\(2x-100)(x+51) &=0 \\x&=50 \text{ or }-51\end{align}$$Thus, choosing the positive solution, we have \(2551^2=2550^2+51^2+50^2\).

Of course, only numbers that are not equal to 7 mod 8 can be represented as a sum of three squares and we find that \( 2551^2 \! \! \mod 8 \equiv 1\). In fact, this value of 1 holds for all such square numbers whose square roots are one more than a pronic number. Thus we can say that if \(n\) is a pronic number then  \( (n+1)^2 \! \! \mod 8 \equiv 1\). 

There's nothing earth shattering in these observations. The connection with pronic numbers caught my attention after watching the video and I thought I'd follow up on it. Of course, numbers like \(2551^2=6507601\) can be expressed as a sum of three squares in probably thousands of ways and the pattern described earlier is just one these.

Sunday, 4 December 2022

Natural Numbers associated with the Eisenstein Integers

 My number associated with my diurnal age today, 26908, is a member of OEIS A118886:


 A118886

Numbers expressible as \(x^2 + x \cdot y + y^2, 0 \leq x \leq y \), in two or more ways. 
 


In the case of 26908, there are three ways viz. 
  • \(x=4 \) and \(y=162\) so that \(4^2+4 \cdot 162+162^2=26908\)
  • \(x=62\) and \(y=124\) so that \(62^2+62 \cdot 124+124^2=26908\)
  • \(x=74\) and \(y=114\) so that \(74^2+74 \cdot 114+114^2=26908\)
As stated in the OEIS comments, the numbers in this sequence represent squares of distances between two points in the triangular lattice in two or more non-trivially different ways. The triangular lattice being referred here is that formed by the so-called Eisenstein integers. Such integers are complex numbers of the form:$$z=a+ b \omega\\ \text{ where } a \text{ and } b \text{ are integers and }\\ \omega=\frac{-1+i \sqrt{3}}{2}=e^{2\pi i/3}$$Thus we have:$$a^2+ab+b^2=(a-\omega)(b-\omega^2) \text{ because }1+\omega+\omega^2=0$$Numbers of the form \(a^2-ab+b^2 \) represent the squared modulus of an Eisenstein integer:

\(|a+b\omega|^2=(a-\frac{1}{2}b)^2+\frac{3}{4}b^2=a^2-ab+b^2\)


Figure 1: from Wikipedia

Thus both numbers of the form \(a^2+ab+b^2 \) and \(a^2-ab+b^2 \) are associated with Eisenstein integers. Looking at the latter type of number we can write:$$ \begin{align} a^2+ab+b^2 &= a^2-2ab+b^2+3ab\\&=(a-b)^2+(\sqrt{3ab})^2\\&=(a-b-i\sqrt{3ab})(a-b+\sqrt{3ab}) \\&=(a-b-i\sqrt{3} \sqrt{ab})(a-b+i\sqrt{3} \sqrt{ab}) \\ &=(a-b-(2\omega+1)\sqrt{ab})(a-b+(2\omega+1)\sqrt{ab}) \\&=(a-b-\sqrt{ab}-2\sqrt{ab} \cdot \omega)(a-b+\sqrt{ab}+2\sqrt{ab} \cdot \omega) \\&=(c_1-d\omega)(c_2+d\omega)\end{align}$$which represents the product of two Eisenstein integers which could be evaluated for 26908 since we know three different sets of values for \(a\) and \(b\). For example, for the case of 
\(a=4 \) and \(b=162\), we have \( \sqrt{ab}=18\sqrt{2}\). There's a lot more that could be said here of course but the important takeaway is the association with the Eisenstein integers.

Getting back to the original OEIS A118886, we find that there are numbers that are of the form \(x^2+xy+y^2\) in eight or more ways. Such numbers include 53599, 63973, 74347, 84721 and 105469. Let's take the last number as an example. The \(x,y\) values associated with this number are (15, 317), (33, 307), (53, 295), (100, 263), (108, 257), (145, 227), (153, 220) and (187, 188).

Using a Jupyter notebook, I was able to find these numbers, in the range up to a little beyond one million, that can be represented in nine or more ways:

157339, 229957, 256711, 306397, 356083, 375193, 427063, 447811, 472017, 505141, 520429, 548359, 554827, 593047, 604513, 612157, 629356, 654199, 654493, 689871, 696787, 730639, 738283, 760627, 770133, 803257, 810901, 831649, 849121, 852943, 872053, 883519, 894691, 902629, 919191, 919828, 956137, 966511, 967603, 1013467, 1018381, 1026844, 1067857, 1101373, 1125579, 1173991, 1204567

Here is a permalink to the code being used but it will time out if run in SageMathCell. Further investigation yielded the numbers shown below that can be represented in ten or more ways. However, now that the list was considerably shorter, it was possible to test each of these numbers to see how many representations are possible and these numbers are shown in brackets after each number. As can be seen, the maximum is twelve in the range up to a little over one million.

375193 (12), 447811 (12), 520429 (12), 593047 (10), 696787 (12), 730639 (12), 738283 (12), 810901 (12), 831649 (12), 849121 (12), 883519 (12), 956137 (12), 966511 (12), 967603 (10), 1013467 (12), 1018381 (12), 1067857 (12), 1101373 (12), 1125579 (12)

SageMathCell makes it easy to determine the number of possible pairs for each number. It's just necessary to tset up the equation. Let's use 1125579 as an example:$$x^2 + x \cdot y + y^2 =1125579$$Here is a permalink to the code that solves this Diophantine equation and the output is:


Figure 2 shows the graph of this elliptic function and there are exactly twenty four points on this graph with coordinates that are integers. Why 24 when we have only 12 above? Well, a restriction had been applied such that \(x \leq y\) but no such restriction need apply for this ellipse. The case of A = (422, 785) and B = (785, 422) is shown below.


Figure 2: using GeoGebra

Friday, 2 December 2022

Woodall Numbers

Today, having turned 26906 days old, I discovered that this number has a connection with so-called Woodall primes that are simply Woodall numbers that are prime. So what characterises a Woodall number? To quote from this source:

In number theory, a Woodall number \( W_n \) is any natural number of the form:$$W_{n}=n\cdot 2^{n}-1$$for some natural number \(n\). The first few Woodall numbers are: 1, 7, 23, 63, 159, 383, 895, … (sequence A003261 in the OEIS). Woodall numbers were first studied by Allan J. C. Cunningham and H. J. Woodall in 1917, inspired by James Cullen's earlier study of the similarly defined Cullen numbers. The previous source goes on to say that:

Woodall numbers that are also prime numbers are called Woodall primes; the first few exponents \(n\) for which the corresponding Woodall numbers \(W_n\) are prime are 2, 3, 6, 30, 75, 81, 115, 123, 249, 362, 384, ... (sequence A002234 in the OEIS); the Woodall primes themselves begin with 7, 23, 383, 32212254719, ... (sequence A050918 in the OEIS) ... almost all Woodall numbers are composite. It is an open problem whether there are infinitely many Woodall primes. As of October 2018, the largest known Woodall prime is \(17016602 × 2^{17016602} − 1\). It has 5,122,515 digits and was found by Diego Bertolotti in March 2018 in the distributed computing project PrimeGrid.

26906 however, to return to my diurnal age, arises in the context of so-called Generalized Woodall Numbers. These numbers are defined thus:

A generalized Woodall number base b is defined to be a number of the form \(n × b^n − 1\), where \(n + 2 > b\) if a prime can be written in this form, it is then called a generalized Woodall prime.

The number associated with my diurnal age turns out to be a member of OEIS A299378:


 A299378

Numbers \(k\) such that \(k \cdot 15^k - 1\) is prime.                              

                                     

Thus it can be seen that 26906 belongs to those exponents for which the generalized Woodall numbers \(k \cdot 15^k -1\), with \(b=15\),  are prime. These are quite rare with the initial exponents being:

2, 10, 14, 2312, 16718, 26906, 27512, 41260, 45432, 162454, 217606

Thus \(26906 \cdot 15^{26906} -1 \) is prime and is needless to say a very large prime. As of November 2021, the largest known generalized Woodall prime with base greater than 2 is \(2740879 \cdot 32^{2740879} − 1\).

Below is a list of numbers \(n\) for increasing values of \(b\) such that \(n \cdot b^n − 1\) is prime. The corresponding OEIS sequence is listed if it exists:

1 3, 4, 6, 8, 12, 14, 18, 20, 24, 30, 32, 38, 42, 44, 48, 54, 60, 62, 68, 72, 74, 80, 84, 90, 98, 102, 104, 108, 110, 114, 128, 132, 138, 140, 150, 152, 158, 164, 168, 174, 180, 182, 192, 194, 198, 200, 212, 224, 228, 230, 234, 240, 242, 252, 258, 264, 270, 272, 278, 282, 284, 294, ... (all primes plus 1) A008864

2 2, 3, 6, 30, 75, 81, 115, 123, 249, 362, 384, 462, 512, 751, 822, 5312, 7755, 9531, 12379, 15822, 18885, 22971, 23005, 98726, 143018, 151023, 667071, 1195203, 1268979, 1467763, 2013992, 2367906, 3752948, ... A002234

3 1, 2, 6, 10, 18, 40, 46, 86, 118, 170, 1172, 1698, 1810, 2268, 4338, 18362, 72662, 88392, 94110, 161538, 168660, 292340, 401208, 560750, 1035092, ... A006553

4 1, 2, 3, 5, 8, 14, 23, 63, 107, 132, 428, 530, 1137, 1973, 2000, 7064, 20747, 79574, 113570, 293912, ..., 1993191, ... A086661

5 8, 14, 42, 384, 564, 4256, 6368, 21132, 27180, 96584, 349656, 545082, ... A059676

6 1, 2, 3, 19, 20, 24, 34, 77, 107, 114, 122, 165, 530, 1999, 4359, 11842, 12059, 13802, 22855, 41679, 58185, 145359, 249987, ... A059675

7 2, 18, 68, 84, 3812, 14838, 51582, ... A242200

8 1, 2, 7, 12, 25, 44, 219, 252, 507, 1155, 2259, 2972, 4584, 12422, 13905, 75606, ... A242201

9 10, 58, 264, 1568, 4198, 24500, ... A242202

10 2, 3, 8, 11, 15, 39, 60, 72, 77, 117, 183, 252, 396, 1745, 2843, 4665, 5364, ... A059671

11 2, 8, 252, 1184, 1308, ... A299374

12 1, 6, 43, 175, 821, 910, 1157, 13748, 27032, 71761, 229918, ... A299375

13 2, 6, 563528, ... A299376

14 1, 3, 7, 98, 104, 128, 180, 834, 1633, 8000, 28538, 46605, 131941, 147684, 433734, ... A299377

15 2, 10, 14, 2312, 16718, 26906, 27512, 41260, 45432, 162454, 217606, ... A299378

16 167, 189, 639, ... A299379

17 2, 18, 20, 38, 68, 3122, 3488, 39500, ... A299380

18 1, 2, 6, 8, 10, 28, 30, 39, 45, 112, 348, 380, 458, 585, 17559, 38751, 43346, 46984, 92711, ... A299381

19 12, 410, 33890, 91850, 146478, 189620, 280524, ... A299382

20 1, 18, 44, 60, 80, 123, 429, 1166, 2065, 8774, 35340, 42968, 50312, 210129, ... A299383

21 2, 18, 200, 282, 294, 1174, 2492, 4348, ...

22 2, 5, 140, 158, 263, 795, 992, 341351, ...

23 29028, ...

24 1, 2, 5, 12, 124, 1483, 22075, 29673, 64593, ...

25 2, 68, 104, 450, ...

26 3, 8, 79, 132, 243, 373, 720, 1818, 11904, 134778, ...

27 10, 18, 20, 2420, 6638, 11368, 14040, 103444, ...

28 2, 5, 6, 12, 20, 47, 71, 624, 1149, 2399, 8048, 30650, 39161, ...

29 26850, 237438, 272970, ...

30 1, 63, 331, 366, 1461, 3493, 4002, 5940, 13572, 34992, 182461, 201038, ...

Let's take some examples for \(b=30\) from the above list. When \(n=1\), we have \(1 \cdot 30^1-1=29\) which is prime and when \(n=63\) we have \(63 \cdot 30^{63}-1\) being prime. This latter number is:

72107360226142762177814830874900999999999999999999999999999999999999999999999999999999999999999