Friday, 29 January 2021

Squaring the Square

Today I turned 26234 days old and one of the properties of the number 26234 is that it is a member of OEIS A217156 with \(n\)=30.


   A217156

Number of perfect squared squares of order \(n\) up to symmetries of the square.    


The comments in the OEIS entry go on to say that:
a(\(n\)) is the number of solutions to the classic problem of 'squaring the square' by \(n\) unequal squares. A squared rectangle (which may be a square) is a rectangle dissected into a finite number, two or more, of squares. If no two of these squares have the same size the squared rectangle is perfect. The order of a squared rectangle is the number of constituent squares. A squared rectangle is simple if it does not contain a smaller squared rectangle, and compound if it does.

For \(n\)<21, it's not possible to put unequal squares together to form a larger square but for \(n\)=21, one such square is possible (see Figure 1):


Figure 1: source
The tiny square in the middle has a side of 2 units

This site puts this square (with a side of 112) in a historical context:
"The dissection was found in the night of March 22, 1978 with the aid of the DEC-10 computer of the Technological University Twente, The Netherlands. Since no simple perfect squared squares were found of orders less than 21, it is a simple perfect squared square of lowest order . Also, it is the only simple perfect squared square of order 21."
The acronym SPSS is often used in referring to these sorts of squares and the letters stand for Simple Perfect Squared Squares. The entries in OEIS A217156 are for both simple and compound squared squares. It is in fact the sequence represents the sum of two separate sequences so that a(\(n\)) = A006983(\(n\)) + A217155(\(n\)) representing numbers of simple and compound squares respectively. The progression from 21 up to 30 is shown in Figure 2:


Figure 2: A006983 + A217155 = A217156

The site squaring.net has PDF file for all the configurations of orders up to 236. The eight configurations for \(n\)=22 have sides of 110, 110, 139, 147, 154, 172, 172 and 192. The SPSS for the side of 192 is shown in Figure 3.


Figure 3: source

Here is a Numberphile video that delves into the history of these squares:


There is an auxiliary video to this which shows the first square discovered and another where the differences in sizes between smallest and largest are least extreme.

Perfect rectangles consist of squares of different sizes that fit together to form a rectangle. No square can be broken down further. The minimum required is 9 and there are two possible configurations. See Figures 4 and 5.


Figure 4: source
33 x 32 rectangle composed of 9 squares
where the tiny square has a side of 1 unit


Figure 5: source
69 x 61 rectangle composed of 9 squares
where the tiny square has a side of 2 units

Monday, 25 January 2021

Polypons

Only recently, on November 25th 2020, I posted about polyiamonds, a particular type of polyform, constructed from equilateral triangles. On the other hand, polypons are constructed from isosceles triangles with angles of 30°, 30° and 120°. The building block, shown in Figure 1, is the monopon or 1-pon.

Figure 1: monopon

What prompts my current investigation into polypons is the fact that today I turned 26230 days old and one of the properties of this number is that is a member of OEIS A151531:


    A151531

Number of 1-sided polypons with \(n\) cells.    


The sequence, from \(n\)=1 to 17, runs 1, 2, 3, 5, 7, 15, 24, 49, 91, 183, 356, 734, 1465, 3017, 6153, 12721, 26230. What is meant by 1-sided is that the polypons cannot be flipped over as they could be if they were 2-sided. Wolfram Player comes to our aid here and we can see, in Figures 2 and 3, the difference in the case of \(n\)=3 for 1-sided and 2-sided tripons.


Figure 2: the three possible types of 1-sided tripons



Figure 3: the two possible types of 2-sided tripons

In Figure 2, the two shapes on the right are mirror images of each other but different because they cannot be flipped over into their mirror counterpart. In Figure 3, the two merge into one because they can be flipped. It is important to realise that the shapes need to be formed from a triangular grid as shown in Figure 4:



Figure 4: source

Without this restriction we could get far more tripons and tetrapons as shown in Figure 5:


Figure 5source

So getting back to the triangular grid and the more restricted arrangements of monopons, Figure 6 shows the possible shapes for the case of \(n\)=6, the hexapons:


Figure 6: the 15 possible types of 1-sided hexapons

A word should be said about the origin of the word pon in polypon. Figure 7 is a snapshot taken from the Collins Dictionary:


Figure 7: source

So getting back to 26230, it can be seen that 17 1-sided monopons can be arranged to form 26230 different 17-pons. The Wolfram Player only stretches to \(n\)=9 and the 91 possible nonapons or 9-pons are shown in Figure 8:


Figure 8: the 91 different types of nonapons

As with the polyiamonds, the polypons can be arranged into interesting shapes. Figure 9 shows a star shape made from ten hexapons:


Figure 9
source

Here is a link to a post of mine on pentominoes from March 1st 2020. Like polypons and polyiamonds, the polyominoes are particular types of polyforms.

Saturday, 16 January 2021

Asymptotic Density of Happy Go Lucky Numbers

The term happy go lucky means cheerfully unconcerned about the future. A happy-go-lucky person does not plan much and accepts what happens without becoming worried. While we may not all be able to share in this happy state most of the time, we can at least enjoy happy go lucky days on a fairly regular basis. 

If we consider our diurnal age, then on certain days our age in days will be what is termed a happy go lucky number. What criteria are used to determine such a number. Well, for a number to be happy, it must satisfy the criterion that repeated sums of squares of digits lead to 1. If it doesn't the number is destined to enter an endless loop. For a number, this is obviously not a happy situation because there is no finality or resolution to its predicament. I wrote about these in a post dated June 26th 2018.

The loop consists of the numbers 4, 16, 37, 58, 89, 145, 42 and 20 with 20 of course leading back to 4. Let's look at an example of an unhappy number. Tomorrow I'll be 26222 days old. That's a lot of 2's. Working with sums of squares of digits, we find that:$$ \begin{align}26222 \rightarrow 2^2+6^2+2^2+2^2+2^2 &=52\\52 \rightarrow 5^2+2^2&=29\\29 \rightarrow 2^2+9^2&=85\\85 \rightarrow 8^2+5^2&=89 \end{align}$$and we've entered the loop, although we knew that would happen at 85 because by reversing the digits we get 58 which is in the loop. However, today I'm 26221 days old and we find that:$$\begin{align} 26221 \rightarrow 2^2+6^2+2^+2^2+1^2&=49\\49 \rightarrow 4^2+9^2&=97\\97 \rightarrow 9^2+7^2&=130\\130 \rightarrow 1^2+3^2+0^2&=10\\10 \rightarrow 1^2+0^2&=1 \end{align}$$and we've reached 1. Thus 26221 is a happy number.

For a number to be lucky, it must avoid a savage cull. I wrote about lucky numbers in an eponymously titled post on December 4th 2016. I've also written about them in The Goldbach Conjecture and Lucky Numbers on November 26th 2019 and Generating Lucky Numbers in Python on June 15th 2018. The cull of the natural numbers involves deleting every second number (thus all even numbers disappear), then every third number, then every fourth number and so on. If a happy number turns out to be lucky as well, then it qualifies as a happy go lucky number.

26221 is the 409th happy go lucky number and so the density of such numbers is about 1.56%. In the millennium from 26000 to 27000, Figure 1 shows the only such numbers:


Figure 1

This represents a frequency of 1.4% which is close to the earliest quoted figure of 1.56%. However, after reading this Scientific American article, I discovered that there is no asymptotic density for the happy numbers. To quote from the article: 
... the lower density of the happy numbers is below 12 percent and the upper density is above 18 percent. The fact that happy numbers do not have a defined asymptotic density means there are parts of the number line that have more happiness concentrated in them than others.
The lucky numbers however, do have an asymptotic density which is the same as that of the prime numbers, namely:$$\frac{1}{\log{n}}$$So do the happy go lucky numbers have an asymptotic density? It would appear not because they will have an upper and lower density just as the happy numbers do, so density ranges from:$$ \frac{12}{\log{n}} \rightarrow \frac{18}{\log{n}} $$ So when \(n=26221\), the density range is from \(1.18 \%\) to \(1.77 \% \) with an average of \(1.48 \%\) which is around what we found earlier. The paper in which Justin Gilmer proves his result can be found here.

Wednesday, 6 January 2021

The Toothpick Sequence and Related Sequences

Yesterday I turned 26210 days old, a number that factorises simply to 2 x 5 x 2621. An initial search of the Online Encyclopaedia of Integer Sequences or OEIS didn't reveal anything to interest so I had to dig a bit deeper (see this post on my Pedagogical Posturing blog for more information on how to do this). Before too long, I found out that 26210 was the 151st member of OEIS A161330 which is why it didn't show up in a regular search.

 
  A161330

Snowflake (or E-toothpick) sequence           
                


To understand the members of this and similar sequences are determined, this resource was invaluable. Figure 1 shows the resource's interface. What's happening in Figure 1 is that two E-toothpicks have been placed together back-to-back


Figure 1

More toothpicks are added to the free ends according to the rules described in the OEIS comments:
The rule for adding new E-toothpicks is as follows. Each E has three ends, which initially are free. If the ends of two E's meet, those ends are no longer free. To go from round \(n\) to round \(n\)+1, we add an E-toothpick at each free end (extending that end in the direction it is pointing), subject to the condition that no end of any new E can touch any end of an existing E from round \(n\) or earlier. (Two new E's are allowed to touch.)

Figure 2 shows the situation when \(n\)=10 and there are 128 toothpicks:

Figure 2

Extending this process to \(n\)=151, we end up to 26210 E-toothpicks. The resource referred to earlier provides a neat table of all the results: See Figure 3.

Figure 3


Of course there are many other toothpick sequences. The drop-down menu for the main sequence in Figure 1 shows the main variants (with the E-toothpick ticked). See Figure 4.


Figure 4

However, within these main variants there are a great many more sub-variants. Let's start at the first sequence shown in Figure 4, namely OEIS A139250, the original toothpick sequence where the toothpick actually looks like a toothpick. See Figure 5 where the grid has been turned on (in Figure 2, the grid was turned off) and for \(n\)=1, there is one toothpick.


Figure 5

Figure 6 shows the situation when \(n\)=10 and there are 55 toothpicks:


Figure 6

We find that in the range between 26000 and 26999, we have:
  • \(n\)=230, we have 26159 toothpicks
  • \(n\)=231, we have 26383 toothpicks
  • \(n\)=232, we have 26555 toothpicks
  • \(n\)=233, we have 26767 toothpicks
It could be argued that with so many different toothpick sequences, almost any number will find a place in at least one of them. So I set out to test this hypothesis. Is there a toothpick sequence that contains 26211 (my diurnal age today)? It turns out that there is at least one sequence and it didn't take me long to find it. 26211 is the 8737th member of OEIS A26211. The sequences increases in multiples of 3 starting with 1, 3, 6, 9, 12, ... and so any number that is a multiple of 3 (as 26211 is) will be a member of the sequence. Figure 7 shows the pattern that is displayed when \(n\)=10 and there are 30 toothpicks:


Figure 7

So whether my hypothesis is true or not I don't know but it seems likely. There is even a three dimensional version of the toothpick sequence: OEIS 160160. Figure 8 shows what it looks like after ten stages:

Figure 8

It is made according to the plan:
Similar to A139250, except the toothpicks are placed in three dimensions, not two. The first toothpick is in the z direction. Thereafter, new toothpicks are placed at free ends, as in A139250, perpendicular to the existing toothpick, but choosing in rotation the x-direction, y-direction, z-direction, x-direction, etc.
The only member of the sequence in the range from 26000 to 26999 is the 76th member, 26759. The topic of toothpick sequences is a huge one and touches on fractals, cellular automata and many other areas. This post is merely a quick glimpse.

Sunday, 3 January 2021

Hemiperfect Numbers

The so-called hemiperfect numbers relate a concept called abundancy that I've dealt with in two previous posts:

I'll define the abundancy of a number \(n\) once again to be the ratio of the sum-of-divisors of \(n\) to \(n\) itself. It is given by the formula:$$ \frac{\sigma_1(n)}{n} \text{ where }\sigma_1(n) \text{ is the divisor function}$$Note that abundancy may also be defined as:$$\sigma_{-1}(n) \text{ where } \sigma_{-1}(n) \text{ represents the sum of the reciprocals of the divisors of } n$$A multiperfect (sometimes multiply perfect) number is a number whose abundancy is a whole number:$$\frac{\sigma_1(n)}{n}=k \text{ with } k \text{ an integer } \geq 2$$We can refer to such a number as \(k\)-perfect with 2-perfect numbers being the perfect numbers 6, 28, 496, 8128 etc.

Today I turned 26208 days old and discovered that this number is a member of OEIS A159907:


  A159907

Numbers \(n\) with half-integral abundancy index such that:                  $$\frac{\sigma_1(n)} {n} = k+\frac{1}{2} \text{ with integer }k$$


Numbers of this sort are termed hemiperfect. The sequence, up to 26208, consists of 2, 24, 4320, 4680, 26208 where:
$$\begin{align}
\frac{\sigma_1(2)} {2} &= \frac{3}{2}=1+\frac{1}{2}\\
\frac{\sigma_1(24)} {24} &= \frac{60}{24}=2+\frac{1}{2} \\
\frac{\sigma_1(4320)} {4320} &= \frac{15120}{4320}=3+\frac{1}{2} \\
\frac{\sigma_1(4680)} {4680} &= \frac{16380}{4680}=3+\frac{1}{2} \\
\frac{\sigma_1(26208)} {26208} &= \frac{91728}{26208}=3+\frac{1}{2}
\end{align}$$After this the numbers get bigger quickly. The next hemiperfect number is 8910720 which has an abundancy of 9/2 and is termed 9-hemiperfect. Similarly, 2 is 3-hemiperfect, 24 is 5-hemiperfect and 4320, 4680 and 26208 are 7-hemiperfect.