Showing posts with label ratio. Show all posts
Showing posts with label ratio. Show all posts

Friday, 8 May 2026

Zeroless Tetranacci Numbers

In a post titled, Sequences Formed By Removing Zerosfrom January 2023,  I wrote that "It's interesting to consider what happens to a sequence if a certain rule is applied but with the stipulation that any zeros arising must be removed". In that post I looked at the zeroless Fibonacci sequence that falls into a repeating loop with a confirmed period of 912. 

The zeroless Tribonacci sequence falls into a much larger repeating loop with a confirmed period of 300,056,874. It reaches this cycle at index 208,666,297. However, it is not known whether the zeroless Tetranacci sequences cycles or not but, if it does, then \(s+p > 10^{10}\) where \(s\) and \(p\) are the starting index and period of the cycle, respectively.

 
 A371916: zeroless analog of tetranacci numbers.

The initial members are:

1, 1, 1, 1, 4, 7, 13, 25, 49, 94, 181, 349, 673, 1297, 25, 2344, 4339, 85, 6793, 13561, 24778, 45217, 9349, 9295, 88639, 1525, 1888, 11347, 13399, 28159, 54793, 17698, 11449, 11299, 95239, 135685, 253672, 495895, 98491, 983743, 183181, 176131, 1441546, 278461, 279319, 2175457

Figure 1 shows a plot of the first 100 terms:


Figure 1: permalink

Like the zeroless Fibonacci and Tribonacci sequences the ratio between successive terms of the zeroless Tetranacci sequence never approaches a limit. With no suppression of zeros, the following are the convergences:

  • Fibonacci: $\phi = \frac{1+\sqrt{5}}{2} \text{ which is }\approx 1.61803$
  • Tribonacci: the real root of $x^3 - x^2 - x - 1 = 0 \text{ which is } \approx 1.83929$
  • Tetranacci: the real root of $x^4 - x^3 - x^2 - x - 1 = 0 \text{ which is }\approx 1.92756$

Sunday, 23 February 2025

Celebrating 27720

It's not often that numbers as large as 27720 attract 632 entries in the Online Encycopedia of Integer Sequences (OEIS). By contrast, 27719 attracts 31 entries and 27721 attracts 27 entries. So what's so special about 27720?


Well, it has lots of interesting properties. Let's look at some of them. 

\( \textbf{PROPERTY 1} \)

The very first entry in the database is OEIS A002182:


A002182  Highly composite numbers: numbers \(n\) where d(\(n\)), the number of divisors of \(n\)  increases to a record.

The initial record holders, up to 40000, are as follows where we see 27720 is a member:

1, 2, 4, 6, 12, 24, 36, 48, 60, 120, 180, 240, 360, 720, 840, 1260, 1680, 2520, 5040, 7560, 10080, 15120, 20160, 25200, 27720

Table 1 shows the details:

Table 1: permalink

\( \textbf{PROPERTY 2} \)

In a similar vein is OEIS A004394 where 27720 also features:


A004394    superabundant numbers: \(n\) such that \( \sigma(n)/n > \sigma(m)/m \) for all \( m < n\), \( \sigma(n)\) being A000203(n), the sum of the divisors of \(n\).

The initial members are as follows with most being the same as for OEIS A002182:

1, 2, 4, 6, 12, 24, 36, 48, 60, 120, 180, 240, 360, 720, 840, 1260, 1680, 2520, 5040, 10080, 15120, 25200, 27720

Table 2 shows the details:

Table 2: permalink

\( \textbf{PROPERTY 3} \)

Another interesting property of the number arises from its appearance in the denominator of the progressive sum of the harmonic numbers. These denominators constitute OEIS A002805.


A002805
    denominators of harmonic numbers \( \text{H}(n) =\displaystyle \sum_{i=1} ^n \dfrac{1}{i} \)

The first terms in the sequence are 1, 2, 6, 12, 60, 20, 140, 280, 2520, 2520, 27720, 27720. Table 3 shows the details.

Table 3: permalink

\( \textbf{PROPERTY 4} \)

The number also arises from a quite simple recurrence relation:


A052542     \( \text{a}(n) = 2 \times \text{a}(n-1) + \text{a}(n-2), \text{ with } \text{a}(0) = 1, \text{a}(1) = 2, \text{a}(2) = 4 \)

The initial members of the sequence are 1, 2, 4, 10, 24, 58, 140, 338, 816, 1970, 4756, 11482, 27720 (permalink).

\( \textbf{PROPERTY 5} \)

Since \(27720 = 2^3 \times 3^2 \times 5 \times 7 \times 11 \), it is 12 times the product of the primorial number \(2310 = 2 \times 3 \times 5 \times 7 \times 11 \) and this qualifies it for membership in OEIS A129912 because 12 is itself a product of primorials viz. 2 x 6.


A129912 numbers that are products of distinct primorial numbers (see A002110).

The initial members of the sequence (with the primorials themselves included) can be generated using this permalink:

1, 2, 6, 12, 30, 60, 180, 210, 360, 420, 1260, 2310, 2520, 4620, 6300, 12600, 13860, 27720, 30030, 37800

Initially I misinterpreted this sequence as meaning numbers that are multiples of primorials but this is not the case. Instead the multiples themselves must be products of primorials and this is far more restrictive.

Sunday, 15 September 2024

Compressing a Hollow Cube


Rewatching the movie "Transformers", my attention was caught by the giant (presumably hollow) cube made up out of many tiny "unit" cubes, that reassembled itself into a much smaller solid cube. This got me thinking about what volume a hollow cube could be compressed into to form a solid cube. Let's consider a  hollow cube with a side of \(n\) units. It has a volume of \(n^3\) cubic units with a hollow centre of \( (n-2)^3 \) cubic units . Thus the number of unit cubes are:$$\begin{align} n^3 - (n-2)^3 &= 2 (n^2 + n(n-2) + (n-2)^2) \\ &= 2(n^2+n^2-2n+n^2-4n+4)\\ &=2(3n^2-6n+4) \end{align}$$Using this formula we can determine the size of the solid cube that can be formed from the unit cubes and how many blocks are left over from this process. See Table 1.


Table 1: permalink

From Table 1 we can see that 216 of the 218 unit cubes that comprise a hollow cube of side 7 units can be used to form a solid cube of side 6 units with only two cubes left over. See Table 2.


Table 2

Also we can see that 13824 of the 13826 unit cubes that comprise a hollow cube of side 49 units can be used to form a solid cube of side 24 units with only two cubes left over. See Table 3.


Table 3

Looking beyond the figures in Table 1, we find that hollow cubes with sides of 163, 385, 751 and 1297 units also compress to solid cubes with sides of 54, 96, 150 and 216 units with two cubes left over (permalink).

We can summarise the results for the "2 left over hollow to solid cubes" as follows:

  • (7, 6) gives 62.97 % ratio of volumes (solid to hollow)
  • (49, 24) gives 11.75 % ratio of volumes (solid to hollow)
  • (163, 54) gives 3.636 % ratio of volumes (solid to hollow)
  • (385, 96) gives 1.550 % ratio of volumes (solid to hollow)
  • (751, 150) gives 0.7968 % ratio of volumes (solid to hollow)
  • (1297, 216) gives 0.4619 % ratio of volumes (solid to hollow)

Naturally as the side length of the hollow cube increases, the ratio of the volume of the solid cube to its hollow counterpart decreases rapidly as more and more empty space is formed inside. For example, in the case of the 751 hollow cube, the ratio of the solid to hollow volumes in less than 1%. It can be noted that none of the sides of the "2 left over hollow to solid cubes" have any factors in common.

Let's see if there's a pattern in the sides of the hollow and solid cubes:
  • 7 = 7 and 6 = 2 * 3
  • 49 = 7^2 and 24 = 2^3 * 3
  • 163 = 163 and 54 = 2 * 3^3
  • 385 = 5 * 7 * 11 and 96 = 2^5 * 3
  • 751 = 751 and 150 = 2 * 3 * 5^2
  • 1297 = 1297 and 216 = 2^3 * 3^3
It can be seen that the solid cubes all contain "6" as a factor. Let's investigate further. Is it possible that a hollow cube with integer sides can be collapsed into a solid cube of integer side \(x\) with no unit cubes left over? If it were possible then we would have:$$ \begin{align} 2(3n^2-6n+4) &= x^3\\6n^2-12n+8 &= x^3\\x &= (6n^2-12n+8)^{1/3}  \end{align}$$Now testing up to \(n=10000\), the expression on the LHS of the equation above never produces a whole number. I'll test for larger values of \(n\) later.

What about when there are two unit cubes left over. In that case we have:$$ \begin{align} 2(3n^2-6n+4) &= x^3+2\\6n^2-12n+6 &= x^3 \\ x &= (6n^2-12n+6)^{1/3} \end{align} $$Now in this case, up to \(n=10000\), we get all the solutions shown above plus some more. These are shown in Table 4.


Table 4: permalink

So the key equation to work with is \(6n^2-12n+(8-a) \) where \(a\) is the number of unit cubes left over. Up to 10000, there are no solutions for \(a=0\) and \(a=1\) but with \(a=2\) we get the solutions shown in Table 4. Going back to Table 1 and using the values of \(a\) shown there in the column "blocks wasted" will produce other tables of solutions as shown in Table 4. There's more to be discovered here but this post is at least a start.

Monday, 13 May 2024

Fibonacci-like Sequences

Consider the following recurrence relation:$$ \text{a} (n)=\text{a} (n-1)+\text{a} (n-8)\\ \text{with } \text{a}(i)=1 \text{ for } i=0 \dots 7 $$The ratio of successive terms approach the golden ratio \( \phi \) just as the terms in the Fibonacci sequence do. Naturally, the terms in the sequence take a while to grow larger. Here are the initial terms:

1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 14, 18, 23, 29, 36, 44, 53, 64, 78, 96, 119, 148, 184, 228, 281, 345, 423, 519, 638, 786, 970, 1198, 1479, 1824, 2247, 2766, 3404, 4190, 5160, 6358, 7837, 9661, 11908, 14674, 18078, 22268, 27428, 33786, 41623

These terms form OEIS A005710. The generating function (permalink) for this sequence is:$$ \frac{1}{1-x-x^8}$$In general, we have:$$a(n) = a(n-1) + a(n-m) \\ \text{ with } a(n) = 1 \text{ for } n = 0 \dots m-1$$The generating function is:$$ \frac{1}{1-x-x^m}$$In the case of \(m=2\), we get the terms in the Fibonacci sequence.

Monday, 11 December 2023

Fibonacci Numbers in the Abundancy Index

I've made several posts over the years concerning numbers and their associated abundancy. The abundancy of a number \(n\) is defined as:$$ \frac{\sigma_1(n)}{n} $$The abundancy of a number is sometimes referred to as its abundancy index. The number associated with my diurnal age today, 27280, is a member of OEIS  A349687:


 A349687

Numbers whose numerator and denominator of their abundancy index are both Fibonacci numbers.


The initial members of the sequence are (permalink):

1, 2, 6, 15, 24, 26, 28, 84, 90, 96, 120, 270, 330, 496, 672, 1335, 1488, 1540, 1638, 8128, 24384, 27280, 44109, 68200, 131040, 447040, 523776, 18506880, 22256640, 33550336, 36197280, 38257095, 65688320, 91963648, 95472000, 100651008, 102136320, 176432256, 197308800

The initial Fibonacci numbers are as follows:

0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711, 28657

In the case of 27280 we have:$$ \begin{align} \frac{\sigma_1(27280)}{27280} &= \frac{71424}{27280}\\ &= \frac{144}{55} \end{align} $$We find that two earlier members of the OEIS sequence, 330 and 1540, have this same abundancy as do two later members, 68200 and 447040. I only checked up to one million so there will be many more numbers with the same abundancy as 27280. Numbers with the same abundancy are called friendly numbers. These number properties are base independent.

A variation on the above would be use the set of square numbers instead of the Fibonacci numbers. Up to 40,000, the square numbers are:

1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225, 256, 289, 324, 361, 400, 441, 484, 529, 576, 625, 676, 729, 784, 841, 900, 961, 1024, 1089, 1156, 1225, 1296, 1369, 1444, 1521, 1600, 1681, 1764, 1849, 1936, 2025, 2116, 2209, 2304, 2401, 2500, 2601, 2704, 2809, 2916, 3025, 3136, 3249, 3364, 3481, 3600, 3721, 3844, 3969, 4096, 4225, 4356, 4489, 4624, 4761, 4900, 5041, 5184, 5329, 5476, 5625, 5776, 5929, 6084, 6241, 6400, 6561, 6724, 6889, 7056, 7225, 7396, 7569, 7744, 7921, 8100, 8281, 8464, 8649, 8836, 9025, 9216, 9409, 9604, 9801, 10000, 10201, 10404, 10609, 10816, 11025, 11236, 11449, 11664, 11881, 12100, 12321, 12544, 12769, 12996, 13225, 13456, 13689, 13924, 14161, 14400, 14641, 14884, 15129, 15376, 15625, 15876, 16129, 16384, 16641, 16900, 17161, 17424, 17689, 17956, 18225, 18496, 18769, 19044, 19321, 19600, 19881, 20164, 20449, 20736, 21025, 21316, 21609, 21904, 22201, 22500, 22801, 23104, 23409, 23716, 24025, 24336, 24649, 24964, 25281, 25600, 25921, 26244, 26569, 26896, 27225, 27556, 27889, 28224, 28561, 28900, 29241, 29584, 29929, 30276, 30625, 30976, 31329, 31684, 32041, 32400, 32761, 33124, 33489, 33856, 34225, 34596, 34969, 35344, 35721, 36100, 36481, 36864, 37249, 37636, 38025, 38416, 38809, 39204, 39601, 40000

We find only 18 numbers qualify (permalink): 

1, 40, 81, 135, 216, 224, 400, 819, 1372, 3240, 3744, 4650, 6318, 18144, 21700, 27930, 30240, 32760

Here is the breakdown:

1 --> 1/1 = 1/1
40 --> 90/40 = 9/4
81 --> 121/81 = 121/81
135 --> 240/135 = 16/9
216 --> 600/216 = 25/9
224 --> 504/224 = 9/4
400 --> 961/400 = 961/400
819 --> 1456/819 = 16/9
1372 --> 2800/1372 = 100/49
3240 --> 10890/3240 = 121/36
3744 --> 11466/3744 = 49/16
4650 --> 11904/4650 = 64/25
6318 --> 15288/6318 = 196/81
18144 --> 60984/18144 = 121/36
21700 --> 55552/21700 = 64/25
27930 --> 82080/27930 = 144/49
30240 --> 120960/30240 = 4/1
32760 --> 131040/32760 = 4/1

These numbers belong to OEIS A069070.

Sunday, 18 June 2023

Gray Code

I'd never heard of this before. I came across it when looking at the properties associated with my diurnal age of 27104. One of its properties is that it's a member of OEIS A265385:


 A265385

Sequence defined by a(1) = a(2) = 1 and a(\(n\)) = gray(a(\(n\)-1) + a(\(n\)-2)), with gray(\(m\)) = A003188(\(m\)).


Here's what Wikipedia has to say on the topic:
The reflected binary code (RBC), also known as reflected binary (RB) or Gray code after Frank Gray, is an ordering of the binary numeral system such that two successive values differ in only one bit (binary digit).

For example, the representation of the decimal value "1" in binary would normally be "001" and "2" would be "010". In Gray code, these values are represented as "001" and "011". That way, incrementing a value from 1 to 2 requires only one bit to change, instead of two.

Gray codes are widely used to prevent spurious output from electromechanical switches and to facilitate error correction in digital communications such as digital terrestrial television and some cable TV systems.

Table 1 shows the relationships between binary, gray code and decimal.


Table 1: source


To understand how this OEIS arises, I needed a way to convert binary to gray code and this site provided some Python code to achieve this. I modified it slightly to accept decimal input (permalink). Armed with this, I began to investigate the sequence. 

The initial values are 1 and 1 and these sum to 2. The binary code for 2, as can be seen from Table 1, is 0010 which the Gray code converts to 0011 and this has a decimal equivalent of 3. Proceeding like this we have:
  • 1 first seed value
  • 1 second seed value
  • 1 + 1 = 2 --> 3
  • 1 + 3 = 4 --> 6
  • 3 + 6 = 9 --> 13
  • 6 + 13 =19 --> 26
  • 13 + 26 = 39 --> 52
  • 26 + 52 = 78 --> 105
  • 52 + 105 = 157 --> 211
  • 105 + 211 = 316 --> 418
  • 211 + 418 = 629 --> 847
  • 418 + 847 = 1265 --> 1673
  • 847 + 1673 = 2520 --> 3380
  • 1673 + 3380 = 5053 --> 6755
  • 3380 + 6755 = 10135 --> 13404
  • 6755 + 13404 = 20159 --> 27104

The OEIS comments note that:
This recurrence is reminiscent of Fibonacci's, except that the result of each step is passed through the binary-reflected Gray code mapping, which introduces a degree of pseudo-randomness. 

However, the ratio of successive terms doesn't approach the Golden Ratio but instead fluctuates around 2 with a variation of about 1% above and below. Here are the successive ratios of \( \frac{(n+1)^{th} \text{ term}}{n^{th} \text{ term}}\):

3.0000000, 2.0000000, 2.1666667, 2.0000000, 2.0000000, 2.0192308, 2.0095238, 1.9810427, 2.0263158, 1.9752066, 2.0203228, 1.9985207, 1.9843079, 2.0220830, 1.9752804, 2.0203033, 1.9986779, 1.9841292, 2.0220523, 1.9752920, 2.0202956, 1.9986750, 1.9841298, 2.0220479, 1.9752930, 2.0202950, 1.9986749, 1.9841299, 2.0220478, 1.9752930, 2.0202950, 1.9986725

There's lots of YouTube videos explaining about Gray code and I'm happy to have finally stumbled upon this clever manipulation of binary code. The OEIS A003188 referred to above lists the decimal equivalents of the Gray code for integers \(n\). The result is a permutation of the order of the cardinal numbers as shown for \(n\) up to 70:

  • 0 --> 0
  • 1 --> 1
  • 2 --> 3
  • 3 --> 2
  • 4 --> 6
  • 5 --> 7
  • 6 --> 5
  • 7 --> 4
  • 8 --> 12
  • 9 --> 13
  • 10 --> 15
  • 11 --> 14
  • 12 --> 10
  • 13 --> 11
  • 14 --> 9
  • 15 --> 8
  • 16 --> 24
  • 17 --> 25
  • 18 --> 27
  • 19 --> 26
  • 20 --> 30
  • 21 --> 31
  • 22 --> 29
  • 23 --> 28
  • 24 --> 20
  • 25 --> 21
  • 26 --> 23
  • 27 --> 22
  • 28 --> 18
  • 29 --> 19
  • 30 --> 17
  • 31 --> 16
  • 32 --> 48
  • 33 --> 49
  • 34 --> 51
  • 35 --> 50
  • 36 --> 54
  • 37 --> 55
  • 38 --> 53
  • 39 --> 52
  • 40 --> 60
  • 41 --> 61
  • 42 --> 63
  • 43 --> 62
  • 44 --> 58
  • 45 --> 59
  • 46 --> 57
  • 47 --> 56
  • 48 --> 40
  • 49 --> 41
  • 50 --> 43
  • 51 --> 42
  • 52 --> 46
  • 53 --> 47
  • 54 --> 45
  • 55 --> 44
  • 56 --> 36
  • 57 --> 37
  • 58 --> 39
  • 59 --> 38
  • 60 --> 34
  • 61 --> 35
  • 62 --> 33
  • 63 --> 32
  • 64 --> 96
  • 65 --> 97
  • 66 --> 99
  • 67 --> 98
  • 68 --> 102
  • 69 --> 103
  • 70 --> 101

Sunday, 2 April 2023

Highly Composite Deficient Numbers

My diurnal age today is 27027 and this factorises as follows:$$27027=3^3 \times 7 \times 11 \times 13$$Although this number, with its many factors and 32 divisors, looks as though it should be abundant, it's not. It just misses the mark because the ratio of the sum of its proper divisors to the number itself just falls short of unity:$$ \begin{align} \frac{ \sigma(27027, 1)-27027}{27027}&=\frac{53760-27027}{27027}\\ &=\frac{26733}{27027} \\ & \approx 0.989121989121989 \end{align}$$On March 24th 2023, I wrote about Balanced Numbers and 27027 is such a number because:$$27027=\overbrace{27}^{2+7=9} \cdot 0 \cdot \overbrace{27}^{2+7=9}$$However, 27027 has a greater claim to fame because it's a member of OEIS A302934:

 
 A302934

Highly composite deficient numbers: deficient numbers \(k\) whose number of divisors \(d(k) \gt d(m) \) for all deficient numbers \(m \lt k\). 


The table below shows a list of deficient numbers up to one million that have a record number of divisors. The ratio of the sum of proper divisors to the number is also shown (permalink).

 number   divisors   ratio

  1        1          0.000000000000000
  2        2          0.500000000000000
  4        3          0.750000000000000
  8        4          0.875000000000000
  16       5          0.937500000000000
  32       6          0.968750000000000
  64       7          0.984375000000000
  105      8          0.828571428571429
  225      9          0.791111111111111
  315      12         0.980952380952381
  1155     16         0.994805194805195
  2475     18         0.953939393939394
  4455     20         0.955555555555556
  8775     24         0.978347578347578
  26325    30         0.994833808167142
  27027    32         0.989121989121989
  63063    36         0.974025974025974
  106029   40         0.971988795518207
  247401   48         0.990614427589217
  693693   54         0.988980716253444
  829521   60         0.995464852607710
  969969   64         0.995280261534132

Looking at the table, the status of 27027 as a record breaker can be seen. Deficient numbers can be ranked by their number of divisors or by how close they approach unity (or how close they approach 2 if we prefer to deal with abundancy). I've investigated the latter in a post titled Odd Deficient Numbers from April 30th 2021. Another post on deficient numbers is Gaps Between Deficient Numbers from October 30th 2020. The post Multiperfect, Hyperfect and Superperfect Numbers from July 24th 2019 is also relevant.

Monday, 14 November 2022

Product Sum Ratios

I'm surprised I've not made a post about this topic before. The topic concerns the result when the product of the digits of a number is divided by the sum of its digits. Of interest is:

  • when is the result of this division an integer?
  • what numbers are associated with records in the size of this integer?
Clearly 1 will start the ball rolling with a record of 1 but after that the next number is 36 with a product of 18 and a sum to 9, giving a record of 2. 66 is next with a product of 36 and a sum of 12, giving a record of 3. Figure 1 shows a list of the record numbers up 10,000 followed by a plot of these numbers (Figure 2). 


Figure 1: permalink


Figure 2: 
permalink

Extending out to 100,000, Figure 3 shows an extended table and Figure 4 shows a plot of the full range of record-breaking numbers.


Figure 3: permalink


Figure 4: 
permalink

I won't show a table of results up to one million but here are the 59 record-breaking numbers (permalink):

1, 36, 66, 88, 257, 268, 279, 369, 459, 578, 579, 678, 789, 999, 2589, 2688, 2799, 3699, 3789, 4599, 4689, 4789, 5788, 5889, 7889, 8888, 18999, 25889, 26789, 26888, 27788, 28899, 37899, 38889, 45999, 46899, 47799, 47889, 55899, 56889, 57789, 58999, 78999, 257899, 258889, 267999, 277899, 278889, 367899, 377889, 378888, 457899, 459999, 489999, 588999, 678999, 688899, 778899, 778999

The results for the final number 778999 are:$$ \frac{ 285768} {49} =5832$$Figure 5 shows a plot of these numbers.


Figure 5: permalink

These numbers define OEIS A240520 that clearly goes on forever:


 A240520

Numbers that set a new integer record for the ratio between the product and the sum of their digits



Interestingly, if the search is extended for numbers up to two million, only one new number is added and that is 1899999 with a digit product of 472392 and a sum of 54, giving the integer 8748 as the result.

Extending the search to three million, we get four new numbers.


Figure 6: permalink

The plot of the full range of numbers is shown in Figure 7.


Figure 7: permalink

What we see in Figure 7 is that 1899999 is very much a singleton, sitting there is splendid isolation. This is even more evident when the search is extended to four million. Three new numbers appear (Figure 8) but they are close together (Figure 9). 


Figure 8: permalink


Figure 9: permalink

Tuesday, 21 June 2022

Barely Abundant Numbers

Today's diurnal age of 26742 days threw up an interesting number property that I can't recall coming across before. This is not surprising because the last occurrence occurred when I was 17816 days old, long before I started keeping track of the numbers associated with my diurnal age. The property in question qualifies both numbers for inclusion in OEIS A071927:


 A071927

Barely abundant numbers: abundant \(n\) such that \( \dfrac{\sigma(n)}{n }< \dfrac{\sigma(m)}{m} \)for all abundant numbers \(m<n,\) \( \sigma(n) \) being the sum of the divisors of \(n\).


The terms in the sequence up to one million are:

12, 18, 20, 70, 88, 104, 464, 650, 1888, 1952, 4030, 5830, 8925, 17816, 26742, 26778, 26886, 26898, 26958, 27042, 27078, 27102, 27114, 27138, 27282, 27294, 27366, 27402, 27498, 27546, 27582, 27618, 27726, 27822, 27834, 27858, 27894, 27906, 27942, 27978, 28038, 28074, 28146, 28218, 28326, 28338, 28374, 28398, 28506, 28554, 28698, 28722, 28734, 28758, 28794, 28806, 28878, 28902, 28986, 29166, 29226, 29262, 29334, 29418, 29454, 29514, 29586, 29598, 29622, 29658, 29706, 29742, 29802, 29814, 29838, 29922, 29958, 29994, 30018, 30054, 30066, 30126, 30138, 30234, 30306, 30354, 30462, 30486, 30522, 30594, 30606, 30642, 30678, 30714, 30882, 30918, 31002, 31026, 31074, 31134, 31182, 31254, 31362, 31386, 31398, 31422, 31566, 31638, 31674, 31686, 31782, 31818, 31854, 31938, 31998, 32082, 32106, 32128, 77744, 91388, 128768, 130304, 442365, 521728, 522752

Figure 1 shows a plot of these values using a vertical log axis and the long evenly spaced stretch from 26742 to 32128 stands out clearly.


Figure 1: permalink

Figure 2 shows the same numbers showing the sigma(n)/n ratios and the factorisation (click on the image to enlarge):


Figure 2: permalink

It can be seen that all the barely abundant numbers from 26742 to 32128 are sphenic numbers of the form 2 x 3 x prime. Interesting all these numbers are admirable numbers, that is numbers whose proper factors add to the number when one of the factors is made negative. With these numbers the factor to be made negative is always 6. For example, the factors 1, 2, 3, -6, 4457, 8914, 13371  add to the admirable number 26742 and the factors 1, 2, 3, -6, 5039, 10078, 15117 add to the admirable number 30234.

It's easy to see why the 2 x 3 x prime are so successful in forming barely abundant numbers. The divisors of a number \(n\) in that case are \(2, 3, n/6, n/3, n/2, n\) and the sum of these divisors is \(2n+5\), giving a \( \sigma(n)/n \) ratio of \(2+5/n \). As \(n\) gets larger, the ratio gets smaller as can be seen in the progressive decrease in the size of the ratio from 26742 to 32128. Why the abrupt gap occurs after 32128 I'm not sure.

So barely abundant numbers will be cropping up quite regularly for the next six to seven years until another "drought" of such numbers occurs between 32129 and 77743.

Thursday, 17 February 2022

Clark's Triangle

One of the properties of today's number 26618, that marks my diurnal age, is that it is a member of OEIS A100206


 A100206

Row sums of Clark's triangle A046902: Clark's triangle: left border = 0 1 1 1..., right border = multiples of 6; other entries = sum of 2 entries above.


The setup is shown in Figure 1, although it is a mirror image of that described in OEIS A100206 because the borders are reversed. The significance of the \( (m-1)^2\) and the \(n^2\) will be explained shortly.
Figure 1: source
To quote from Figure 1's source:
Clark's triangle is a number triangle created by setting the vertex equal to 0, filling one diagonal with 1s, the other diagonal with multiples of an integer \(f\), and filling in the remaining entries by summing the elements on either side from one row above. Figure 1 above shows Clark's triangle for \(f\)=6.
Call the first column \(n\)=0 and the last column \(m=n\) so that:
$$\begin{align} c_{m \, \scriptsize{0}} &= f\,m\\
c_{m\,m} &= 1 \end{align}$$then use the recurrence relation$$c_{m\,n}=c_{m-\scriptsize{1}, \,\normalsize{n}-\scriptsize{1}}+c_{m-\scriptsize{1}, \,\normalsize{n}}$$to compute the rest of the entries. The result is given analytically by$$c_{m\,n}=f \times \binom{m} {n+1}+\binom{m-1}{n-1}$$where \( \binom{n}{k} \) is a binomial coefficient.
The interesting part is that if \(f\)=6 is chosen as the integer, then 
\( c_{m \, \scriptsize{2}} \) and \(c_{m \, \scriptsize{3}}\) simplify to$$ \begin{align} c_{m \, \scriptsize{2}} &= (m-1)^3\\c_{m \, \scriptsize{3}} &= \dfrac{(m-1)^2(m-2)^2}{4} \end{align}$$which are consecutive cubes \( (m-1)^3 \) and nonconsecutive squares$$n^2=\left ( \dfrac{(m-1)(m-2)}{2} \right )^2$$The sum of the \(m\)-th row for \(m>0\) is given by$$ \sum_{n=0}^{m} c_{m\,n}=2^{m-1}+f \times (2^{m}-1) $$ (M. Alekseyev, pers. comm., Aug. 10, 2005).

 The row sums (of which 26618 is a member and where \(f\)=6) are as follows:

0, 7, 20, 46, 98, 202, 410, 826, 1658, 3322, 6650, 13306, 26618, 53242, 106490, 212986, 425978, 851962, 1703930, 3407866, 6815738, 13631482, 27262970, 54525946, 109051898, 218103802, 436207610, 872415226, 1744830458, 3489660922

Of course there are as many sequences as there are different values of \(f\) but none is listed in the OEIS apart from A100206 where \(f\)=6. In all sequences, the ratio of successive terms rapidly approaches 2.

Sunday, 7 November 2021

Trilinear Coordinates

I'm familiar with Cartesian coordinates and polar coordinates but only recently encountered trilinear coordinates in the context of triangles. See Figure 1.

Figure 1

In Figure 1, it can be seen that the point P is a perpendicular distance a', b' and c' from the sides a, b and c respectively. Working with Cartesian coordinates would require that the triangle be placed and oriented on the Cartesian plane. However, our interest is really on the distances a'b' and c' and even here it's not that actual distances but ratio of the distances. This is where trilinear coordinates come to our assistance.

The trilinear coordinates are written as ka' : kb' : kc' where k is any positive constant, chosen so that the ratio is in its simplest form. Point P in any triangle that is similar to that shown in Figure 1 can be associated with these trilinear coordinates. Figure 2 shows a different triangle in which the point P is external to the triangle.

Figure 2

Here the line AC or b lies between P and the vertex B. However, the lines AB or c and BC or a do not lie between the respective vertices C and A. In such a situation, kb' is given a negative sign whereas ka' and kc' are positive. Here are the trilinear coordinates for some common points:
  • A = 1 : 0 : 0

  • B = 0 : 1 : 1

  • C = 0 : 0 : 1

  • incentre = 1 : 1 : 1
    (the centre of the circle that has the triangle sides as tangents)

  • centroidbc : ca : ab = 1/a : 1/b : 1/c = cosecA : cosecB : cosecC
    (the point where the medians meet)

  • circumcentre = cosA : cosB : cosC
    (the centre of the circle that passes through the three vertices)

  • orthocentre = secA : secB : secC
    (the point where the altitudes meet)
There are many more points associated with triangles but this is a start. Note how the trilinear coordinates or trilinears as they are sometimes called can be expressed in terms of the sides of the triangle or the angles opposite these sides. Figure 3 shows the situation for the centroid (marked G) where AX, BY and CZ are medians.

Figure 3

Remember that the medians of a triangle, divide it into six smaller triangles of equal area. Looking at Figure 3, it can be seen that:
  • Area of ∆AGC = Area of ∆AGB = Area of ∆BGC
  • 1/2 x b x b' = 1/2 x c x c' = 1/2 x a x a'
  • bb'=cc' and so b'/c'=c/b or b':c'=c:b or b':c'=ac:bc
  • cc'=aa' and so c'/a'=a/c or c':a'=a:c or c':a'=ab:bc
  • a':b':c'=bc:ac:ab=1/a:1/b:1/c
  • a/sinA=b/sinB=c/sinC and so a:sinA=b:sinB=c:sinC
  • a':b':c'=1/a:1/b:1/c=1/sinA:1/sinB:1/sinC=cosecA:cosecB:cosecC
Figure 4 shows a specific example of the trilinear coordinates for a right-angled triangle with angles of 30° and 60°.

Figure 4

References: 

Tuesday, 27 July 2021

Semiprimes that Approximate Whole Numbers

I've written about semiprimes on many occasions dating back to my earliest posts. These posts are:

Thus far however, I've not considered semiprimes that closely approximate whole numbers. However, today I turned 26413 days old and this number is a semiprime with prime factors of 61 and 433. If the smaller factor is divided into the larger, we get:$$\frac{433}{61} \approx 7.09836065573770$$This is fairly close to 7 but I thought I'd investigate the first one million natural numbers, using SageMathCell, to see which semiprimes yielded the closest approximations. I thought \( \pm 0.1\) was a fair distance limit to set and by this criterion 26413 just sneaks in. Figure 1 shows a table with the initial semiprimes that qualified, ranked in order of successively smaller differences between the ratio of prime factors and 7.


Figure 1: permalink to SageMathCell

What struck me as odd about this table is that 25681 and 26413 have identical differences with the ratio of the former being just below 7 and the latter just above. The reason for this becomes clear once we look at the average of these two numbers, 26047, and compare the factorisation of all three:$$ 25681 =61 \times 421\\26047=7 \times 61^2\\26413=61 \times 433$$Let's rewrite the factorisation of the average so that we have:$$ 25681 =61 \times 421\\26047=61 \times 427\\26413=61 \times 433$$Let's divide all three by \(61^2\) to get:$$ \begin{align} \frac{25681}{61^2}&=\frac{421}{61}=7-\frac{6}{61}\\ \frac{26047}{61^2}&=7\\ \frac{26413}{61^2}&=\frac{433}{61}=7+\frac{6}{61} \end{align} $$Notice how \( \dfrac{6}{61} \approx 0.0983606557377049 <0.1\). Up to one million, there are the following such pairs of semiprimes that are equidistant from 7 because of the same mechanism. See Figure 2.


Figure 2: permalink to SageMathCell

Getting back to the closest approximations to 7, Figure 3 shows the top contenders. It can be seen that, generally speaking, the approximations get closer as the numbers get larger. We can surmise that for there exists semiprimes \(p \times q \) with \(p<q\) such that:$$ \lvert \frac{q}{p}-7 \rvert < \epsilon \text{ for any } \epsilon \text{ , no matter how small}$$

Figure 3: permalink to SageMathCell

So in the range up to one million, there are 307 semiprimes \(p \times q \) that meet the criterion and they all fit in within the brackets as shown in Figure 4. Infinitely many such semiprime ratios can be fitted into the space between the brackets.


Figure 4

These calculations of course can be carried out for any number, not just 7, and the algorithm I developed in SageMath allows for the number to be changed. For example, Figure 5 shows the semiprimes in the range up to one million that approximate 11 most closely within the range \( \pm 0.1 \):


Figure 5: permalink to SageMathCell

Figure 6 shows that there are again pairs of semiprimes that are equidistant from 11, one above and one below:


Figure 6: permalink to SageMathCell

Let's look at the first row in Figure 6: 946097 and 942581 with an average of 944339. This will serve to give us practice in understanding why such pairs exist.$$ 946097 =293 \times 3229\\944339=11 \times 293^2\\942581=293 \times 3217$$Again rewrite the factorisation of the average so that we have:$$ 946097 =293 \times 3229\\944339=293 \times 3223\\942581=293 \times 3217$$Let's divide all three by \(293^2\) to get:$$ \begin{align} \frac{946097}{293^2}&=\frac{3229}{293}=11+\frac{6}{293}\\ \frac{944339}{293^2}&=11\\ \frac{942581}{293^2}&=\frac{3217}{293}=11-\frac{6}{293} \end{align} $$Again we note that \( \dfrac{6}{293} \approx 0.0204778156996587 <0.1\).

Let's designate the whole number that we are interested in as \(n\). So far we've looked at 7 and 11 as specific examples. In general, these semiprime pairs occur when there exists a multiple of \(n\) of the form \(n \times p^2\) where \(p\) is a prime. This number can be written as \(np \times p\). The two semiprimes, one above and one below, must contain this \(p\) as one of their factors with the other factors being \( np-a \) and \( np+a \) respectively, where \(a\) is some integer. Thus we have three numbers in arithmetic progression:$$p \times (np-a), np \times p,p \times (np+a)$$Dividing all terms by \(p^2\) gives:$$n-\frac{a}{p}, \, n, \, n+\frac{a}{p}$$with \(\dfrac{a}{p}\) needing to be less than an agreed size e.g. 0.1.