Thursday, 31 October 2024

An Interesting Sequence

Here's an interesting question that was posed by PUZZLE A DAY on 30th October 2024: What number comes next in this sequence and why? 1, 7, 11, 27, ...

Mathematically, there doesn't seem to be any pattern and I needed the clue provided to proceed any further. Here is the clue:

Clue: 
Say the number aloud.

Immediately we know that the sequence is about how the number sounds and not about anything to do with the numbers per se. When we sound the numbers out, we have:
  • one ... single syllable
  • seven ... two syllables
  • eleven ... three syllables
  • twenty seven ... four syllables
Clearly we are looking for the next number that has five syllables and that numbers happens to be 77 or seventy seven. So we now have 1, 7, 11, 27, 77, ...

That's where the puzzle ends but the question then arises as to the next number in the sequence. This will take us into the hundreds and we need to decide whether to sound out the "and" or not. For example, 101 can be read as "one hundred and one" or "one hundred one". Let's go with the latter and search for the next number. 

As far as I can determine this must be 107 or one hundred seven that has five syllables. After that it would be 111 or one hundred eleven with six syllables. So now we have: 1, 7, 11, 27, 77, 107, 111. 
After this the next number with seven syllables is 127 or one hundred twenty seven. For eight syllables, it would 177 or one hundred seventy seven. Let's stop there and then list what we have so far is 1, 7, 11, 27, 77, 107, 111, 127, 177, ...

The puzzle's focus on the sound of the number rather than the number itself reminds of aban, eban, iban, oban and uban numbers. See my blog post Iban Numbers. It's also reminscent of the Look and Say Sequence. Finally, the Mathematics section of PUZZLE A DAY can be found here.

Wednesday, 30 October 2024

Multipurpose Algorithm using SageMath

Given the recent problems with Numbers Aplenty (see blog post Trouble with Numbers Aplenty), I've continued developing a SageMath program that will generate information about a number in a manner similar to Numbers Aplenty. At the moment, for any number that is input, the following output is generated:

  • factorisation of the number or declaration that it is prime
  • number of divisors
  • list of divisors
  • sum of divisors and factorisation of the sum
  • sum of proper divisors and factorisation of the sum
  • determination of whether a number is deficient, perfect or abundant
  • if abundant, determination of whether the number is pseudoperfect or weird
  • if abundant, determination of whether the number is a Zumkeller number
  • if abundant, determination of whether the number is practical
  • determination of whether number is Duffinian
  • totient and its factorisation
  • cototient and its factorisation
  • determination of whether number is cyclic
  • sum of squares of digits and factorisation of the sum
  • sum of cubes of digits and factorisation of the sum
  • determination of whether the number is admirable
  • determination of whether the number is an interprime number
  • determination of whether the number is a Bogota number
  • determination of whether the number is a Curzon number
  • determination of whether the number is a plaindrome in any base from 2 to 16
  • determination of whether the number is metadrome in any base from 2 to 16
  • determination of whether the number is a nialpdrome in any base from 2 to 16
  • determination of whether the number is a katadrome in any base from 2 to 16
  • determination of whether the number is a xenodrome in any base from 2 to 16
  • determination of whether the number is an additive Fibonacci-like number of the second type in any base from 2 to 16
  • Gray Code equivalent of the number and its factorisation
  • absolute difference between the number and its Gray Code and factorisation of this difference
  • determination of whether the number is an Ulam number and, if so, display the two numbers that add together to form it
  • binary complement of the number and its factorisation
  • absolute difference between the number and its binary complement and factorisation of this difference
  • determination of whether the number is energetic
  • number expressed as a sum of two squares if possible
  • number expressed as a sum of two cubes if possible
  • sum of digits (SOD) and product of digits (POD)
  • number + SOD and factorisation of this sum
  • number - SOD and factorisation of this sum
  • number + POD and factorisation of this sum
  • number - POD and factorisation of this sum
  • sequence generated by repetition of Number + SOD - POD
  • sequence generated by repetition of Number + SOD - POD but with zeros ignored
  • Collatz trajectory of the number
  • aliquot sequence determined up to a maximum of 101 steps
  • antidivisors of the number
  • arithmetic derivative of the number
  • determination as to whether number is a D-number
  • determination as to whether number is a de Polignac number
  • sequence produced by Maximum-Minimum recursive algorithm
  • Minimum Goldbach Decomposition
  • sequence generated by Reverse and Add 
  • Home Prime calculated to a maximum of 50 steps
  • Additive Persistence
  • Multiplicative Persistence taking zeros into account
  • Multiplicative Persistence NOT taking zeros into account
  • sequence generated by repetition of Number + Sum of Odd Digits - Sum of Even Digits
  • Circulant Matrix
  • Determinant of Circulant Matrix and its factorisation
  • absolute difference between the numbers and the determinant and factorisation of this difference
I'll keep adding to this program over time using my Jupyter notebook. The program will run in SageMathCell although the creation of a Permalink in not possible. Here's a link to a Google Doc bookmark however:


The code located at this bookmark can be copied into SageMathCell and run.

POSTSCRIPT: 31st October 2024

The day after I made this post the Numbers A Plenty website was down again so all the more reason to keep refining my SageMath algorithm.

Monday, 28 October 2024

Number + SOD - POD Sequences

In this post, I will be using SOD as meaning the Sum Of Digits of a number and POD as meaning the Product Of Digits of a number. Consider a number like 27602 that is the number associated with my diurnal age today. What happens if I repeatedly add the sum of its digits and subtract the product of its digits? Because it contains the digit zero, its POD is initially 0 but this soon changes as I repeat the process. Here is the 27602's trajectory that consists of 26 steps (permalink):

276002, 276019, 276044, 276067, 276095, 276124, 275474, 267663, 258621, 257685, 240918, 240942, 240963, 240987, 241017, 241032, 241044, 241059, 241080, 241095, 241116, 241083, 241101, 241110, 241119, 241065, 241083

As can be seen, a loop is reached. What about 27610? Its trajectory consists of 27 steps (permalink):

27610, 27626, 26641, 26372, 25888, 20799, 20826, 20844, 20862, 20880, 20898, 20925, 20943, 20961, 20979, 21006, 21015, 21024, 21033, 21042, 21051, 21060, 21069, 21087, 21105, 21114, 21115

There is no loop here so why does the sequence terminate with 21115. The answer is that this number has a SOD (2 + 1 + 1 + 1 + 5 = 10) equal to its POD (2 x 1 x 1 x 1 x 5 = 10). So for every number, the corresponding sequence will have a finite number of steps ending in either a loop or a number with SOD = POD. 

What's of interest now are the progressive record lengths of the sequences as we consider larger and larger numbers. Table 1 shows the record lengths up to 110,000. 

Around 10,000 it can be seen that there is a big jump from 39 (9541) to 85 (9980) and again aroud 100,000 there is an even bigger jump from 98 (98907) to 631 (99970). If I were to continue there would be another big jump around one million. The sequence of numbers with record lengths is:

1, 10, 400, 417, 432, 482, 730, 2200, 2217, 2232, 2282, 2800, 2903, 3610, 4601, 5177, 6821, 7248, 9380, 9541, 9980, 9990, 10002, 98907, 99970, 99980, 99990, 100008

This sequence is not listed in the OEIS and I certainly won't be proposing it for inclusion. Variations on this theme are of course possible. For example, the product of digits could exclude the digit 0. This digit makes no difference to the sum of a number's digits but it has the effect of always sending the product of its digits to zero.

This makes a big difference to the sequence of record lengths and we no longer get those big jumps around 10,000, 100,000 and 1,000,000. Firstly though, let's go back to the original number 27601 and see how its trajectory is affected. The new trajectory is:

27601, 27533, 26923, 26297, 24811, 24763, 23777, 21745, 21484, 21247, 21151

The initial product of digits is now not zero but 2 x 7 x 6 x 1 = 84. The sum of its digits is still 16 but the SOD - POD now becomes 16 - 84 = -68 and so the next number in the sequence is 27533. The sequence ends with 21151 which has its SOD = POD.

The record lengths are shown in Table 2.


Table 2

The sequence of numbers with record lengths with zero not counting in the POD is now as follows:

1, 11, 100, 810, 1918, 1931, 2614, 2831, 2905, 3149, 3226, 3638, 3943, 4116, 4228, 4290, 4543, 6242, 7504, 7600, 7730, 8152, 8405, 9714, 19911, 23191, 23318, 23470, 25364, 27001, 29270, 44573, 45552, 46680, 47163, 47730, 49434, 54181, 54641, 55418, 56100, 57135, 71620, 73191, 73302, 74620, 75210, 78543, 81200, 82452, 83292, 87294, 88803, 95900, 97630, 98180, 100000, 100002

On the subject of numbers from 10 up to 100,000 in which SOD = POD, it is only these combination of digits that satisfy (permalink):

[2, 2], [1, 2, 3], [1, 1, 2, 4], [1, 1, 1, 2, 5], [1, 1, 1, 3, 3], [1, 1, 2, 2, 2]

There are 68 numbers in the range from 1 to 100,000 that satisfy SOD = POD and they are:

1, 2, 3, 4, 5, 6, 7, 8, 9, 22, 123, 132, 213, 231, 312, 321, 1124, 1142, 1214, 1241, 1412, 1421, 2114, 2141, 2411, 4112, 4121, 4211, 11125, 11133, 11152, 11215, 11222, 11251, 11313, 11331, 11512, 11521, 12115, 12122, 12151, 12212, 12221, 12511, 13113, 13131, 13311, 15112, 15121, 15211, 21115, 21122, 21151, 21212, 21221, 21511, 22112, 22121, 22211, 25111, 31113, 31131, 31311, 33111, 51112, 51121, 51211, 52111

However, if we don't include zero in the product of digits then there are 164 numbers that qualify because we can insert zeros into all the above numbers with impunity. Of course this means that some numbers will exceed 100,000 and so will not be included in the list below (permalink).

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 22, 30, 40, 50, 60, 70, 80, 90, 123, 132, 202, 213, 220, 231, 312, 321, 1023, 1032, 1124, 1142, 1203, 1214, 1230, 1241, 1302, 1320, 1412, 1421, 2013, 2020, 2031, 2103, 2114, 2130, 2141, 2301, 2310, 2411, 3012, 3021, 3102, 3120, 3201, 3210, 4112, 4121, 4211, 10124, 10142, 10203, 10214, 10230, 10241, 10302, 10320, 10412, 10421, 11024, 11042, 11125, 11133, 11152, 11204, 11215, 11222, 11240, 11251, 11313, 11331, 11402, 11420, 11512, 11521, 12014, 12030, 12041, 12104, 12115, 12122, 12140, 12151, 12212, 12221, 12401, 12410, 12511, 13020, 13113, 13131, 13311, 14012, 14021, 14102, 14120, 14201, 14210, 15112, 15121, 15211, 20103, 20114, 20130, 20141, 20301, 20310, 20411, 21014, 21030, 21041, 21104, 21115, 21122, 21140, 21151, 21212, 21221, 21401, 21410, 21511, 22112, 22121, 22211, 23010, 24011, 24101, 24110, 25111, 30102, 30120, 30201, 30210, 31020, 31113, 31131, 31311, 32010, 33111, 40112, 40121, 40211, 41012, 41021, 41102, 41120, 41201, 41210, 42011, 42101, 42110, 51112, 51121, 51211, 52111

If we try reversing the order of the subtraction so that we have number + POD - SOD, the POD soon causes the sequences for many numbers to increase without bound. In the case of POD with zeros counted, the number 23 was the first to exceed a sequence length of 700. When zeros were not counted, 516 was the first number to exceed 700. 

Sunday, 20 October 2024

Xenodromes


Ben 10 Ultimate Alien: Xenodrome is a fighting
mobile game that was released on mobile devices.

This post has nothing to do with the above mentioned game instead I noticed that the number associated with my diurnal age today, 27594, has no repeating digits and I wondered if there was a word to describe such a number. Well, the OEIS uses the term "xenodrome" and, in base 10, there are 8,877,691 of them with the first being 0 and the last being 9,876,543,210. These numbers form OEIS A010784. Numbers of this sort are not listed in Numbers Aplenty. In the range up to 40,000, there are 14,346 xenodromes.

With so many numbers, it's best to apply some sort of sieve and one that comes to be mind is the metadrome, a number in which the digits are in strictly increasing order. If we look at numbers that are both xenodromes and metadromes in the range up to 40,000, we find that there are only 375 of them:

1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 14, 15, 16, 17, 18, 19, 23, 24, 25, 26, 27, 28, 29, 34, 35, 36, 37, 38, 39, 45, 46, 47, 48, 49, 56, 57, 58, 59, 67, 68, 69, 78, 79, 89, 123, 124, 125, 126, 127, 128, 129, 134, 135, 136, 137, 138, 139, 145, 146, 147, 148, 149, 156, 157, 158, 159, 167, 168, 169, 178, 179, 189, 234, 235, 236, 237, 238, 239, 245, 246, 247, 248, 249, 256, 257, 258, 259, 267, 268, 269, 278, 279, 289, 345, 346, 347, 348, 349, 356, 357, 358, 359, 367, 368, 369, 378, 379, 389, 456, 457, 458, 459, 467, 468, 469, 478, 479, 489, 567, 568, 569, 578, 579, 589, 678, 679, 689, 789, 1234, 1235, 1236, 1237, 1238, 1239, 1245, 1246, 1247, 1248, 1249, 1256, 1257, 1258, 1259, 1267, 1268, 1269, 1278, 1279, 1289, 1345, 1346, 1347, 1348, 1349, 1356, 1357, 1358, 1359, 1367, 1368, 1369, 1378, 1379, 1389, 1456, 1457, 1458, 1459, 1467, 1468, 1469, 1478, 1479, 1489, 1567, 1568, 1569, 1578, 1579, 1589, 1678, 1679, 1689, 1789, 2345, 2346, 2347, 2348, 2349, 2356, 2357, 2358, 2359, 2367, 2368, 2369, 2378, 2379, 2389, 2456, 2457, 2458, 2459, 2467, 2468, 2469, 2478, 2479, 2489, 2567, 2568, 2569, 2578, 2579, 2589, 2678, 2679, 2689, 2789, 3456, 3457, 3458, 3459, 3467, 3468, 3469, 3478, 3479, 3489, 3567, 3568, 3569, 3578, 3579, 3589, 3678, 3679, 3689, 3789, 4567, 4568, 4569, 4578, 4579, 4589, 4678, 4679, 4689, 4789, 5678, 5679, 5689, 5789, 6789, 12345, 12346, 12347, 12348, 12349, 12356, 12357, 12358, 12359, 12367, 12368, 12369, 12378, 12379, 12389, 12456, 12457, 12458, 12459, 12467, 12468, 12469, 12478, 12479, 12489, 12567, 12568, 12569, 12578, 12579, 12589, 12678, 12679, 12689, 12789, 13456, 13457, 13458, 13459, 13467, 13468, 13469, 13478, 13479, 13489, 13567, 13568, 13569, 13578, 13579, 13589, 13678, 13679, 13689, 13789, 14567, 14568, 14569, 14578, 14579, 14589, 14678, 14679, 14689, 14789, 15678, 15679, 15689, 15789, 16789, 23456, 23457, 23458, 23459, 23467, 23468, 23469, 23478, 23479, 23489, 23567, 23568, 23569, 23578, 23579, 23589, 23678, 23679, 23689, 23789, 24567, 24568, 24569, 24578, 24579, 24589, 24678, 24679, 24689, 24789, 25678, 25679, 25689, 25789, 26789, 34567, 34568, 34569, 34578, 34579, 34589, 34678, 34679, 34689, 34789, 35678, 35679, 35689, 35789, 36789

If we were to consider katadromes instead of metadromes, then in the range up to 40,000 the highest number can only be 9876 so that's a little too restrictive. Katadromes are numbers in which the digits are in strictly decreasing order. See blog posts Metadromes and Katadromes.

Of course numbers can be xenodromes in other bases and 27594 serves as a good example because not only is it a xenodrome in base 10 but also in bases 8, 9, 11 and 12 and others as well no doubt:$$ \begin{align} 27594_{10} &= 41760_{\, 9} \\&= 65712_{\, 8} \\&= 19806_{11} \\&= 13b76_{12} \end{align}$$

Friday, 18 October 2024

An Interesting Prime

Being born on the 3rd April 1949, my date of birth is often represented as 3 - 4 - 49. These numbers when concatenated form the prime number 3449. I was reminded of this number because of the factorisation of the number associated with my diurnal age today, 27592.$$27592 = 2^3 \times 3449 = 8 \times 3449$$So today my life can be divided into exactly eight equal parts, each of them 3449 days long which is about 9.44 years. The previous multiple$$7 \times 3449 = 24143$$occurred on May 10th 2015 when I was still working at the Shanghai Singapore International School. The next multiple$$9 \times 3449 = 31041$$ will fall on March 29th 2034, shortly before my 84th birthday (if I make it that far).

3449 forms the initial prime of a Cunningham chain of the first type with length exactly 3 and so: $$ 3449 \rightarrow 2 \times 3449 + 1 = 6889 \text{ (prime)} \\ 6889 \rightarrow 2 \times 6889 +1 = 13799 \text{ (prime)}$$Primes with this property form OEIS A059762. Another prime-related property of 3449 qualifies it for membership in OEIS A088483:


A088483
: primes \( \textit{p} \) such that \(p^2+p-1\) and \(p^2+p+1\) are twin primes.

For 3449, the twin primes are \(11899049\) and \(11899051\). 

3449 is also a home prime with a homeliness of 3 because:$$ \begin{align} 611 &= 13 \times 47 \rightarrow 1347\\ 1347 &= 3 \times 449 \rightarrow 3449 \end{align}$$Not all primes are home primes of course. Take 613 as an example of a prime that is not a home prime because it cannot be formed by the concatenation of the prime factors of any number (the prime factors need to be concatenated in ascending order).

3449 is also a member of OEIS A153116:


A153116
: primes \(p\) such that \(p^2 +12\) and \(p^2-12\) are also primes.

Here the two primes are \(11895589\) and \(11895613\). Additionally:$$ \text{period of}\frac{1}{3449}=\frac{3449-1}{8} = 431$$This property qualifies 3449 for membership of OEIS A056213:


A056213: primes \(p\) for which the period of reciprocal = \(\dfrac{p-1}{8}\).

3449 is a Sophie Germain prime because:$$2 \times 3449+1=6899 \text{ is prime}$$3449 also features in so-called "Golden Semiprimes" and this qualifies it for membership in OEIS A108544:


A108544
: primes that are factors of distinct golden semiprimes (A108540).


I posted about these types of semiprimes in Semiprime Factor Ratios way back on the 26th August 2016. In that post I said that:

A golden semiprime is a number that factors to:
  • \(p \times q\) where \(p\) and \(q\) are prime
  • \( | \,p \, \phi - q \,| <1\) where \(\phi=\dfrac{\sqrt{5}+1}{2} \)
In the case of 3449, it is the \(q\) and \(p=2131\) and the golden semiprime is:$$7349819=2131 \times 3449$$The OEIS mentions 314 sequences in which 3449 makes an appearance and I've only dealt with a few of them here. However, I see 3449 as an important number in my life and didn't want its current occurrence to pass unnoticed.

Wednesday, 16 October 2024

LEGO Mathematics

Figure 1 shows a 1 x 4 LEGO brick.

Figure 1

It turns out that if you have another three of these bricks and you stack them in every possible way on top of this base brick, then there are 27591 ways that you can do this. Today I'm 27591 days old and this number appeared in OEIS A123782:


A123782: number of ways to build a contiguous building with n LEGO blocks of size 1 x 4 on top of a fixed block of the same size. The base block is not counted among the \(n\) and must be the only block in the bottom layer of the building

The sequence begins 23, 679, 27591, 1227556, 59212274, 2990304700, 156407426393, ...

So there are 23 ways to stack a single 1 x 4 brick on top of another 1 x 4 brick. It took me a little sketching and visualisation but there are indeed 23 ways to do it. One way is to place the brick directly on top, then there are six more ways to do it with the long axes parallel and then sixteen ways to do with the long axes at right angles. Rotational symmetries are ignored here and only the strict physical orientation of the bricks are considered. Thus we have 1 + 6 + 16 = 23. So the famous number 23 pops up even in the context of LEGO.

There are other OEIS sequences relating to LEGO blocks and they are: 

  • A007575: number of stable towers of 2 X 2 LEGO blocks.

  • A007576: number of maximally stable towers of 2 X 2 LEGO blocks.

  • A112389: Number of ways, counted up to symmetry, to build a contiguous building with n LEGO blocks of size 2 X 4.

  • A112390: number of ways of building a building of height k using n 2 X 4 LEGO blocks, counted up to symmetry.

  • A123762: number of ways, counted up to symmetry, to build a contiguous building with n LEGO blocks of size 1 X 2

    ... right through to 

    A123827: number of ways to build a contiguous building with n LEGO blocks of size 2 X 3 on top of a fixed block of the same size so that the building is symmetric after a rotation by 180 degrees.

  • A123829: number of ways, counted up to symmetry, to build a contiguous building with n LEGO blocks of size 2x4 which is symmetric after a rotation by 180 degrees

    ... right through to

  • A123849: number of ways to build a contiguous building with n LEGO blocks of size 5 X 5 on top of a fixed block of the same size so that the building is symmetric after a rotation by 90 degrees.

  • A272690: number of buildings with n 2 X 4 LEGO bricks of maximal height.

Tuesday, 15 October 2024

Another Look At Elliptic Curves


Source

It was on the 24th February 2021 that I made a post title Elliptic Curves and I've not made mention of them since despite their importance in high level mathematics. However, I was reminded of them again by a recent article in Quanta Magazine titled Big Advance on Simple-Sounding Math Problem Was a Century in the Making on the 14th October 2024. The article begins:

One morning last November, the mathematician Hector Pasten(opens a new tab) finally solved the problem that had been dogging him for more than a decade by using a time-tested productivity hack: procrastination.

He was supposed to be writing a final exam for his number theory class at the Pontifical Catholic University of Chile in Santiago. To avoid the task, he started pondering, for the umpteenth time, one of his favorite sequences: 2, 5, 10, 17, 26 and so on, the list of all numbers of the form \(n^2 + 1\) (where \(n\) is a whole number).

Mathematicians have used this sequence for over a century to probe the fraught relationship between addition and multiplication, a tension that lies at the heart of number theory. Fundamental problems about multiplication — about, say, how numbers factor into primes — suddenly become much deeper and more challenging as soon as addition enters the picture. One of math’s biggest open questions, for example, asks whether every even number larger than 2 is the sum of two primes; another asks whether there are infinitely many pairs of primes that differ by only 2, such as 11 and 13.

The \(n^2 + 1\) sequence offers a good starting point for investigating the relationship between addition and multiplication, because it combines one of the simplest types of multiplication (squaring a number) with one of the simplest types of addition (adding 1). That doesn’t mean the sequence itself is simple. Mathematicians still can’t answer elementary questions about it, such as whether it contains infinitely many primes. “It doesn’t take far to get to the boundary of our knowledge,” said Andrew Granville(opens a new tab) of the University of Montreal. When mathematicians do manage to shift this boundary even a little, the techniques they develop often illuminate much broader questions about addition and multiplication.

Pasten was trying to show that the numbers in the sequence must always have at least one prime factor that is fairly large. On the morning when he should have been writing his final exam, he finally succeeded, by figuring out how to embed information about the prime factors of \(n^2 + 1\) in the structure of an equation called an elliptic curve.

Over lunch that day, he described his proof to his wife, the mathematician Natalia Garcia-Fritz(opens a new tab). Given the surprising strength of his result, she “told me that I should probably check this many times,” Pasten said. “That afternoon I did so, and the theorems were still there.”

The elliptic curve that Pasten was focused on is \(y^2 = x^3 + 3x + 2n \) with the variable \(n\) being any integer. Curves of the form:$$ y^2=x^3+Ax+B$$have a discriminant given by:$$ \Delta=-16(4A^3+27B^2)$$Thus when \(A=3\) and \(B=2n\) we have:$$ \Delta=16 \times 108 (1+n^2)$$It was the \(n^2+1\) factor in the discriminant that caught Pasten's attention. The level of mathematics that he then applied to make his discovery is beyond my comprehension unless I take the Krell Brain Boost but here is an excerpt from the article that explains what he found:

Applying his theory of Shimura curves to this particular elliptic curve, he could show that the product of the exponents of \(n^2 + 1\) must be fairly small. This didn’t necessarily mean that all the exponents must be small, but it gave him enough control over them to be able to bring in Stewart and Yu’s older method from transcendence theory. By using the two techniques together, he was able to prove that the largest prime factor of \(n^2 + 1\) must be at least about \( (\log(\log n))^2\) — the square of the estimate Chowla and Mahler discovered in the 1930s. Pasten’s new growth rate is much higher than the previous record, though mathematicians suspect the true growth rate is higher still.

Figure 1 shows what the curve looks like when \(n=7\):


Figure 1

In my earlier post on Elliptic Curves, I mentioned that SageMath provides a way of finding the integer values of \(x\) and \(y\) that satisfy the equation of elliptic curves of the form \(y^2=x^3+ax+b\), namely:

E=EllipticCurve([a,b])

E.integral_points()

In the case of \(n=7\) there is only the point where the curve \(y^2 = x^3 + 3x + 14 \) crosses the \(x\)-axis and thus \(x=-2\) and \(y=0\). However, other values of \(n\) yield more points. For example, if \(n=11\) we have the curve \(y^2 = x^3 + 3x + 22 \) and the points:$$(2 : \pm \, 6) \text{ and } (6 : \pm \, 16)$$Figure 2 shows the graph of this curve:


Figure 2

So that's just a brief refresher on elliptic curves and a reminder of how important they are in higher mathematics.

Sunday, 13 October 2024

More On Digit Equations

I've posted before about rendering numbers as digit equations, specifically:

Yesterday the number 27586 caught my attention because it can easily be rendered as a digit equation, viz.:$$27586 \rightarrow 2+7+5=8+6$$but it has the special quality that no digits are repeated. This got me wondering what other five digit numbers have this property. In the range of numbers from 27586 to 40000, there are 371 numbers that satisfy the two criteria:
  • number has no repeating digits
  • number can be split into two parts and a digit equation formed from the sum of the digits on either side of the equal sign
Here are the numbers (permalink):

27586, 27603, 27630, 27801, 27810, 28019, 28037, 28046, 28064, 28073, 28091, 28109, 28136, 28145, 28147, 28154, 28156, 28163, 28165, 28174, 28190, 28307, 28316, 28349, 28361, 28367, 28370, 28376, 28394, 28406, 28415, 28451, 28459, 28460, 28495, 28514, 28541, 28569, 28596, 28604, 28613, 28631, 28640, 28679, 28697, 28703, 28730, 28901, 28910, 29038, 29047, 29056, 29065, 29074, 29083, 29137, 29146, 29148, 29157, 29164, 29173, 29175, 29184, 29308, 29317, 29368, 29371, 29380, 29386, 29407, 29416, 29461, 29470, 29478, 29487, 29506, 29560, 29605, 29614, 29641, 29650, 29704, 29713, 29731, 29740, 29803, 29830, 30126, 30148, 30159, 30214, 30216, 30241, 30249, 30416, 30418, 30425, 30429, 30452, 30461, 30517, 30519, 30526, 30562, 30571, 30618, 30627, 30645, 30654, 30672, 30681, 30719, 30728, 30746, 30764, 30782, 30791, 30829, 30847, 30856, 30865, 30874, 30892, 30948, 30957, 30975, 30984, 31026, 31048, 31059, 31206, 31260, 31408, 31426, 31462, 31480, 31509, 31527, 31572, 31590, 31628, 31682, 31729, 31756, 31765, 31792, 31857, 31875, 31958, 31967, 31976, 31985, 32014, 32016, 32041, 32049, 32104, 32106, 32140, 32160, 32401, 32409, 32410, 32418, 32481, 32490, 32519, 32546, 32564, 32591, 32647, 32674, 32748, 32784, 32849, 32867, 32876, 32894, 32968, 32986, 34016, 34018, 34025, 34029, 34052, 34061, 34106, 34108, 34126, 34160, 34162, 34180, 34205, 34209, 34218, 34250, 34281, 34290, 34502, 34520, 34601, 34610, 34658, 34685, 34759, 34768, 34786, 34795, 34869, 34896, 35017, 35019, 35026, 35062, 35071, 35107, 35109, 35127, 35170, 35172, 35190, 35206, 35219, 35246, 35260, 35264, 35291, 35602, 35620, 35701, 35710, 35769, 35796, 35879, 35897, 36018, 36027, 36045, 36054, 36072, 36081, 36108, 36128, 36180, 36182, 36207, 36247, 36270, 36274, 36405, 36450, 36458, 36485, 36504, 36540, 36702, 36720, 36801, 36810, 37019, 37028, 37046, 37064, 37082, 37091, 37109, 37129, 37145, 37154, 37156, 37165, 37190, 37192, 37208, 37248, 37280, 37284, 37406, 37415, 37451, 37459, 37460, 37468, 37486, 37495, 37514, 37541, 37569, 37596, 37604, 37640, 37802, 37820, 37901, 37910, 38029, 38047, 38056, 38065, 38074, 38092, 38146, 38157, 38164, 38175, 38209, 38245, 38249, 38254, 38267, 38276, 38290, 38294, 38407, 38416, 38425, 38452, 38461, 38469, 38470, 38496, 38506, 38524, 38542, 38560, 38579, 38597, 38605, 38614, 38641, 38650, 38704, 38740, 38902, 38920, 39048, 39057, 39075, 39084, 39147, 39156, 39158, 39165, 39167, 39174, 39176, 39185, 39246, 39264, 39268, 39286, 39408, 39417, 39426, 39462, 39471, 39480, 39507, 39516, 39561, 39570, 39615, 39624, 39642, 39651, 39705, 39714, 39741, 39750, 39804, 39840

I've looked at the first number in this sequence so let's look at the last:$$39840 \rightarrow 3+9=8+4+0$$The sequence will eventually terminate because the largest number possible will contain all ten digits but what might this number be? For a start it can't contain all the digits from 0 to 9 because the sum of these digits is 45 and can't be divided into two equal parts. So we have to drop the 1 if looking for the largest possible number. I think the largest possible number is 985647320 where we have:$$985764320 \rightarrow 9+8+5=7+6+4+3+2+0$$It's also possible to swap the 5 on the left with the 32 on the right so that we get 983276540 so that we have:$$983276540 \rightarrow 9+8+3+2=7+6+5+4+0$$However, this number is smaller than the previous and so it is not the largest possible. What about five digit numbers that satisfy the following criteria:
  • number has no repeating digits
  • number can be split into two parts and a digit equation formed from the product of the digits on either side of the equal sign
In this case, between 27586 and 40000, there are only 38 numbers that qualify (permalink):

29136, 29163, 29316, 29361, 29613, 29631, 31426, 31462, 31629, 31692, 31846, 31864, 32649, 32694, 34126, 34162, 34216, 34261, 34612, 34621, 34689, 34698, 36129, 36192, 36219, 36249, 36291, 36294, 36489, 36498, 36912, 36921, 38146, 38164, 38416, 38461, 38614, 38641

Let's take the first number in this list, 29136, where we have:$$29136 \rightarrow 2 \times 9 = 1 \times 3 \times 6$$The last number in the list is 38641 where we have:$$38641 \rightarrow 3 \times 8 = 6 \times 4 \times 1$$Other variations on this theme are possible such as using the sum of squares of the digits. For example, let's propose the criteria:
  • number has no repeating digits
  • number can be split into two parts and a digit equation formed from the sum of the squares of the digits on either side of the equal sign
These criteria yield 48 numbers in the range from 27586 to 40000. These are (permalink):

27614, 27641, 27658, 27685, 27869, 27896, 28769, 28796, 29067, 29076, 29607, 29670, 29706, 29760, 30267, 30627, 31857, 31875, 32067, 32607, 32670, 34517, 34571, 35417, 35471, 36027, 36207, 36245, 36254, 36270, 36425, 36452, 36524, 36542, 38157, 38175, 39158, 39185, 39457, 39475, 39518, 39547, 39574, 39581, 39745, 39754, 39815, 39851

Let's take the first number in the list, 27614, as an example:$$27614 \rightarrow 2^2+7^2 = 6^2+1^2+4^2$$The last number in the list, 39851, can be split as follows:$$39851 \rightarrow 3^2+9^2=8^2+5^2+1^2$$More variations are possible of course but that will do for now. Forming digit equations from the digits of a number falls most definitely into the realm of recreational mathematics and is base-10 specific but it's an interesting mental exercise and what's wrong with having fun with numbers anyway.

These types of mental exercises, especially for children, can serve as an easy entry point to number theory after which they can embark on a deeper exploration of number properties that are not base-specific and that are intrinsic to the number itself, such as primeness and the sum of a number's divisors relative to the number itself that determines whether it is deficient, perfect or abundant.

Saturday, 12 October 2024

Record Runs Involving Home Primes

I just happened to notice that there is a run of six consective numbers from 27597 to 27602 inclusive that are only one step removed from their home primes. The only longer run up to one million that occurs is a run of eight numbers from 45162 to 45169.

Here is a permalink for finding these runs. Currently I'm 27586 days old and so the coming record run is not far off. Here are the factorisations for the numbers and the home primes associated with them.

  • \(27597 = 3 \times 9199 \rightarrow 39199\)

  • \(27598 = 2  \times13799 \rightarrow 213799 \)

  • \(27599 = 11 \times 13 \times 193 \rightarrow 1113193 \)

  • \(27600 = 2^4 \times 3 \times 5^2 \times  23 \rightarrow 222235523 \)

  • \(27601 = 7 \times 3943 \rightarrow 73943 \)

  • \(27602 = 2 \times 37 \times 373 \rightarrow 237373 \)
The run of eight numbers is listed below together with factorisations and home primes:

  • \(45162 = 2 \times 3^2 \times 13 \times 193 \rightarrow 23313193 \)

  • \(45163 = 19 \times 2377 \rightarrow 192377 \)

  • \(45164 = 2^2 \times 7 \times 1613 \rightarrow 2271613 \)

  • \(45165 = 3 \times 5 \times 3011\rightarrow 353011 \)

  • \(45166 = 2 \times 11 \times 2053 \rightarrow 2112053 \)

  • \(45167 = 31^2 \times 47 \rightarrow 313147\)

  • \(45168 = 2^4 \times 3 \times 941 \rightarrow 22223941 \)

  • \(45169 = 17 \times 2657 \rightarrow 172657 \)
All concatenations are applied to the prime factors in order from lowest to highest. Of course, runs formed by numbers that are concatenations of prime factors from highest to lowest are impossible because every second number is even with a smallest factor of 2. Every second concatenated number will thus be even as well.

Thursday, 10 October 2024

Binary Complement

I hadn't really heard of the binary complement or 1's complement as it's alternatively called until I came across one of the sequences of which 27583 is a member. The sequence is OEIS A323067:


A323067    Primes whose binary complement (A035327) is a square.

To find the binary complement of a number, simply the invert the 0's and 1's in its binary representation. Let's use 27583 and its binary representation as an example:$$27583_{10}=110101110111111_2$$It's binary complement is:$$1010001000000_2=1584_{10}=72^2$$Thus 27583 does belong in OEIS A323067 and Table 1 shows the members of the sequence up to 40,000 together with their binary complements and square roots:


Table 1: permalink

Notice that powers of 2 plus 1 will all have binary complements equal to 0. All decimal numbers have a 1's complement or binary complement. However, it is not 1-to-1 relationship as different numbers can have the same complement. This is different to the Gray Code that also involves manipulation of the binary digits of a number to produce a new number but involves a 1-to-1 relationship.

The following source gives more information about the topic and its applications:  https://www.tutorialspoint.com/one-s-complement

The Prime Constant And Beyond

A recent Numberphile video informed me of the prime constant which firstly incodes all the primes within an infinitely long sequence of 0's and 1's as shown below:$$01101010001010001010001000001010000010001010001 \dots$$The leading zero corresponds to 1 which is not prime and the next two 1's correspond to 2 and 3 that are prime and so on. The next step is to add a decimal point in front of the leading zero to get:$$0.01101010001010001010001000001010000010001010001 \dots$$This represents a number between 0 and 1 and if we interpret this as a number in base 2 we have a constant that can be expressed as (permalink):$$ \begin{align} \text{Prime Constant } &= \frac{0}{2^1}+\frac{1}{2^2}+\frac{1}{2^3}+\frac{1}{2^4} + \dots \\ \\&\approx 0.414682509851112 \dots \end{align}$$Of course, we could equally well create the non-prime constant by representing every non-prime by a 1 and every prime as a 0. This gives:$$ \text{Non-Prime Constant } \approx 0.585317490148888 \dots$$The prime constant and the non-prime constant of course add to 1. The same idea can be applied to create other constants, for example a Fibonacci constant. The Fibonacci numbers are:$$1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, \dots $$This generates a series of 0's and 1's as follows:$$ 11101001000010000000100000000000010000 \dots$$It can be seen that the three leading 1's are there because 1, 2 and 3 are Fibonacci numbers whereas 4 is not and so it represented by a 0 etc. This gives (permalink):$$ \text{Fibonacci Constant } \approx 0.910278797207866 \dots$$It can thus be seen that all monotonically increasing sequences like the sequence of prime numbers and the sequence of Fibonacci numbers can be represented by a constant between 0 and 1. The base 2 representation is arbitrary but simple but other bases could be used especially to represent more than one sequence. For example, base 4 could be used to represent primes, square-free semiprimes and sphenic numbers. So a 3 could represent a square-free semiprime, a 2 could represent a sphenic number, a 1 could represent a prime and 0 could represent a number that is none of these. This leads to another constant, let's call it the 1-2-3 Factor Constant, where we have a series of 0's, 1's, 2's and 3's:$$011012100210122010102210020013102220 \dots$$These again are converted to a number between 0 and 1:$$0.011012100210122010102210020013102220 \dots$$Interpreting this as a number in base 4 leads to (permalink):$$ \begin{align} \text{1-2-3 Factor Constant } &= \frac{0}{4^1}+\frac{1}{4^2}+\frac{1}{4^3} + \dots \\  \\ &\approx 0.0796530489502776 \dots \end{align}$$There is endless fun to be had in generating these sorts of constants from multiple sequences.

Wednesday, 9 October 2024

Magic Numbers

Many stable atoms have ‘magic numbers’ of protons and neutrons − 75 years ago, two physicists discovered their special properties

Published: October 7, 2024 7.55pm BST

This is the article that alerted me to the existence of these so-called "magic numbers".

The word magic is not often used in the context of science. But in the early 1930s, scientists discovered that some atomic nuclei – the center part of atoms, which make up all matter – were more stable than others. These nuclei had specific numbers of protons or neutrons, or magic numbers, as physicist Eugene Wigner called them.

The race to figure out what made these nuclei so stable began. Understanding these magic numbers would allow scientists to predict the properties of other nuclei, such as their mass or how long they are expected to live. With that, scientists could also predict which combinations of protons and neutrons can result in a nucleus.

The solution to the puzzle came in 1949 from two directions simultaneously. In the U.S., physicist Maria Goeppert Mayer published an explanation, at the same time as a group of scientists led by J. Hans D. Jensen in Germany found the same solution.

For their discovery, the two physicists each got a quarter of the 1963 Nobel Prize in physics. We’re two nuclear scientists whose work is built on Goeppert Mayer’s and Jensen’s discoveries 75 years ago. These magic numbers continue to play an important role in our research, only now we can study them in nuclei that live for just a fraction of a second.

Stability in the atom

The atom is a complex system of particles. It’s made up of a central nucleus consisting of protons and neutrons, called nucleons, with electrons orbiting around the nucleus.

Nobel prize-winning physicist Niels Bohr described these electrons in the atom as existing in a shell structure. The electrons circulate around the nucleus in particular energy levels, or orbits. These orbits have specific energies, and each orbit can hold only so many electrons.

Chemical reactions result from interactions between the electrons in two atoms. In Bohr’s model, if an electron orbit is not already filled, then it’s easier for the atoms to exchange or share those electrons and induce chemical reactions.

The Bohr model of the atom.

One class of elements, the noble gases, hardly ever react with other elements. In noble gases, the electrons occupy completely filled orbits, and as a result the atoms greedily hold onto their electrons instead of sharing and undergoing a chemical reaction.

In the 1930s, scientists wondered whether protons and neutrons might also occupy orbits, like electrons. But nobody could show this conclusively. For more than a decade, the scientific community was unable to describe the nucleus in terms of individual protons and neutrons. Scientists used a more simplified picture, one that treated protons and neutrons as one single system, like a drop of water.

In 1949, Goeppert Mayer and Jensen developed the so-called shell model of the nucleus. Protons and neutrons occupy particular orbits, analogous to electrons, but they also have a property called spin – similar to a spinning top. Goeppert Mayer and Jensen found that when combining the two properties in their calculations, they were able to reproduce the experimental observations.

Through some experiments, they found that nuclei with certain magic numbers of neutrons or protons are unusually stable and hold onto their nucleons more than researchers previously expected, just like how noble gases hold onto their electrons.

The magic numbers known to scientists are 2, 8, 20, 28, 50, 82 and 126. They are the same for both protons and neutrons. When a nucleus has a magic number of protons or neutrons, then the particular orbit is filled, and the nucleus is not very reactive, similar to the noble gases.

For example, the element tin has a magic number of protons. Tin always has 50 protons, and its most common isotope has 70 neutrons. Isotopes are atoms of the same element that have a different number of neutrons.

There are nine other stable isotopes of tin that can exist – it’s the element with the largest number of stable isotopes. A stable isotope will never spontaneously change into a different element, which is what happens to radioactive isotopes.

Helium, with two protons and two neutrons, is the lightest “doubly magic” nucleus. Both its neutron count and its proton count are a magic number. The forces that hold the helium-4 nucleus together are so strong that it’s impossible to attach another proton or neutron. If you tried to add another proton or neutron, the resulting atom would fall apart instantaneously.

On the other hand, the heaviest stable nucleus in existence, lead-208, is also a doubly magic nucleus. It has magic numbers of 82 protons and 126 neutrons.

Many stable isotopes have magic numbers of protons and neutrons.

Examples of magic numbers and stable nuclei exist everywhere – but scientists couldn’t explain them without the introduction of the shell model.

Stable nuclei in nature

The shell structure in nuclei tells researchers about how elements are distributed across the Earth and throughout the universe.

One of the most abundant elements on our planet and in the human body is oxygen, in particular the isotope oxygen-16.

With eight protons and eight neutrons, oxygen-16 has an extremely stable nucleus. A nearby star produced the oxygen we find on Earth through nuclear reactions in its core sometime before the solar system was formed.

Since oxygen nuclei are doubly magic, these nuclei in the star did not interact very much with other nuclei. So more oxygen was left around to eventually act as an essential ingredient for life on Earth.

In her Nobel lecture, Maria Goeppert Mayer talked about the work she did with physicist Edward Teller. The two had attempted to describe how these elements formed in stars. In the 1930s, it was impossible for them to explain why certain elements and isotopes were more abundant in stars than others. She later found that the increased abundances corresponded to nuclei with something in common: They all had magic numbers of neutrons.

With the shell model and the explanation of magic numbers, the production of elements in stars was possible and was published in 1957.

Scientists today continue to use ideas from the nuclear shell model to explain new phenomena in nuclear science. A few accelerator facilities, such as the Facility for Rare Isotope Beams, where we work, aim to create more exotic nuclei to understand how their properties change compared with their stable counterparts.

At the Facility for Rare Isotope Beams, scientists produce new isotopes by accelerating stable isotopes to about half the speed of light and smashing them at a target. Out of the pieces, we select the rarest ones and study their properties.

Possibly the most profound modern discovery is the fact that the magic numbers change in exotic nuclei like the type we create here. So, 75 years after the original discovery, the race to discover the next magic number is still on.

If the sequence of numbers  2, 8, 20, 28, 50, 82,126 is entered into the OEIS, we find A018226 :


A018226
     Magic numbers of nucleons: nuclei with one of these numbers of either protons or neutrons are more stable against nuclear decay.

The OEIS comments state:

"The results of the experiment indicate that 54Ca's first excited state lies at a relatively high energy, which is characteristic of a large nuclear shell gap, thus indicating that N = 34 in 54Ca is a new magic number, as predicted theoretically by the University of Tokyo group in 2001. By conducting a more detailed comparison to nuclear theory the researchers were able to show that the N = 34 magic number is equally as significant as some other nuclear shell gaps." Link

So it seems that maybe 34 should be included as well. It's interesting that the discovery was made in my birth year, 1949, now 75 years ago. So the sequence currently may better be represented as:$$2, 8, 20, 28, 34, 50, 82,126$$

Monday, 7 October 2024

My Wordle Statistics

Figure 1 shows a screenshot of my Wordle statistics as of the 6th October 2024, a day on which I turned 75.5 years old.


Figure 1

Even though I've played 629 games, I lost 11 of them because I didn't guess the correct word in six tries or under. In order to accurately assess my average score, these losses need to be taken into account. To do that, I think the best approach is to add the number 7 to the guess distribution and include the 11 losses there. This then gives the following (number, frequency) distribution:$$(\textbf{1},0), (\textbf{2},38),(\textbf{3},196),(\textbf{4},234),(\textbf{5},113),(\textbf{6},37),(\textbf{7},11)$$The arithmetic mean can then be calculated using the formula:$$ \begin{align} \text{mean} &= \frac{\text{total of number} \times \text{frequency}}{\text{frequency total}}\\ &= \frac{2464}{629}\\ &\approx 3.92 \end{align} $$So there we have it. My average is slightly under 4 tries in successfully guessing the correct word. Google's Gemini confirms that the introduction of the 7 is the best way to calculate the average. How do I compare with the rest of the world? Well, there is an interesting site that lists statistics regarding Wordle results worldwide. Figure 2 shows a world map. 


Figure 2: data as of 22nd August 2023

Canberra, Australia, is the global city with the best Wordle average: 3.58 guesses. Sweden is the world’s best country at Wordle, with an average of 3.72. The source used to obtain this data was tweets on Twitter or X as it's now called. Clearly this introduces a huge bias because only people who are keen Wordle players will bother tweeting about their Wordle expertise and there will be a decided bias toward posting impressive success rather than bare wins (six guesses) or losses (failing to identify the word within six guesses). There's also the possibility of straight out cheating.

There's also hard mode and default mode. On every turn in the former you must use all the letters guessed on the previous turn. I haven't set Wordle to hard mode but I always play that way, although occassionally I'll slip up and forget to use a letter that I've already guessed. There's an online site that will generate your average once you input your data. Based on data input to this site, the statistics shown in Figure 3 seem more believable:

Figure 3: source

Once again however, only very dedicated players will be using this site but at least it shows that my average is higher than the national average for Australia. There is a site that lists the results for each day's Wordle and this site is based on actual attempts made that day to the Wordle site. See Figure 4.

Figure 4: source

These results most accurately depict the correct state of affairs I think. I've posted previously about Wordle: Wordle Statistics on 7th of February 2022 and More Wordle Statistics on 8th of February 2022.

Sunday, 6 October 2024

Getting SageMath Help From Gemini

The number associated with my diurnal age yesterday, 27579, has the property that it represents the number of squarefree, Carlitz compositions of 22. An example of such a composition would be [ 2, 3, 1, 5, 7, 3, 1 ] where no adjacent elements are equal and all elements are squarefree. The number 27579 is a member of OEIS A301500:


A301500: number of compositions (ordered partitions) of \(n\) into squarefree parts (A005117) such that no two adjacent parts are equal (Carlitz compositions).


The initial members of this sequence are:

1, 1, 1, 3, 3, 5, 11, 15, 25, 45, 69, 115, 193, 309, 513, 849, 1387, 2291, 3771, 6189, 10195, 16773, 27579, 45391, 74675, 122837, 202111, 332507, 547011, 899949, 1480583, 2435803, 4007361, 6592863, 10846405, 17844319, 29357197, 48297813, 79458705, 130724101, 215064673

I tried to develop some working SageMath code to generate the number of suitable compositions for a particular value of \(n\) but was constantly thwarted for reasons unknown. I thought I'd try to get some help from Google's Gemini and initially asked for some Python code. This didn't work and the second request also failed, so I asked for SageMath code and though the first code provided failed, the second worked. See Figure 1.


Figure 1: permalink

The code executes swiftly on SageMathCell but as usual I don't really understand the details of how it works. However, Gemini can be called upon to explain its own code and it does quite a good job. After reading the explanation, I have a much clearer idea of what's going on. Here is a public link to my question and Gemini's response.

What I notice is that the "professional code" is so much more efficient from my own. I generally get my SageMath code to work but I realise that my code is rarely very efficient. Anyway, the point of this post is a reminder to myself, and perhaps others, that Gemini can generate quite efficient SageMath code and does a good job of explaining how that code works.