Tuesday 30 July 2019

The Fibonacci Number Base

In a blog post of Sunday, 15th November 2015, titled Goldbach's Conjecture and Zeckendorf's Theorem, I wrote the following:
I came across Zeckendorf's Theorem when examining the number 24331. It's similar to Goldbach's Conjecture in that it deals with the decomposition of numbers but into Fibonacci numbers, not primes. It states, to quote from Wikipedia again, that: 
Every positive integer can be represented uniquely as the sum of one or more distinct Fibonacci numbers in such a way that the sum does not include any two consecutive Fibonacci numbers. 
Now the first few Fibonacci numbers are: 
1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711, 28657, 46368 
The Wikipedia article goes on to state that the theorem has two parts: 
Existence: every positive integer n has a Zeckendorf representation.Uniqueness: no positive integer n has two different Zeckendorf representations. 
The example is given of the number 100 = 89 + 8 + 3. There are other ways of representing 100 as the sum of Fibonacci numbers: 100 = 89 + 8 + 2 + 1 and 100 = 55 + 34 + 8 + 3 but these are not Zeckendorf representations because 1 and 2 are consecutive Fibonacci numbers, as are 34 and 55.
This is the first time I've revisited the topic. I found a site that will calculate the relevant Fibonacci numbers that add to a given number. Figure 1 shows the calculation for today's number of 25684:

Figure 1: source

The result as can be seen is {1,21,55,144,987,6765,17711}. I've also developed an algorithm in SageMath that does this also but I'm still refining it. The Zeckendorf system uses the set with the fewest Fibonacci numbers in it. The same site has a calculator that will express a given number in terms of a Fibonnaci number base using the digits 0 and 1. The idea is that a number like 25684 would be represented as 101000100010101000001 where the rightmost 1 stands for the largest Fibonacci number and the leftmost 1 or 0 stands for the smallest Fibonacci number (which is 1 in this system). If a particular number does not form part of the same then its position is occupied by a 0. The calculator is shown in Figure 2:

Figure 2: source

My SageMath algorithm clumps all the 0's and 1's together and I'm still trying to work out what the problem is. For numbers in the vicinity of my current age (in days), seven or eight numbers seem to be generally required:
  • \(25684 = 101000100010101000001_{Zeck}\) with 7 ones 
  • \(25685 = 101000100010101000010_{Zeck}\) with 7 ones
  • \(25686 = 101000100010101000100_{Zeck}\) with 7 ones
  • \(25687 = 101000100010101000101_{Zeck}\) with 8 ones
  • \(25688 = 101000100010101001000_{Zeck}\) with 7 ones
  • \(25689 = 101000100010101001001_{Zeck}\) with 8 ones
As a number base, it's hardly compact but a simple way to compress it would be to use the same system that it used in data compression: representing consecutive runs of 0's and 1's by the binary digit and an associated superscript that expresses the length of the run. In this way, the numbers above become:
  • \(25684 = 1010^310^3101010^51_{Zeck}\) 
  • \(25685 =1010^310^3101010^410_{Zeck}\)
  • \(25686 =1010^310^3101010^310^2_{Zeck}\)
  • \(25687 = 1010^310^3101010^3101_{Zeck}\)
  • \(25688 = 1010^310^3101010^210^3_{Zeck}\)
  • \(25689 = 1010^310^3101010^210^21_{Zeck}\)
It's interesting to note, using the calculator in Figure 1, how many possible sets of Fibonacci numbers there are that add to a given number. Here are the results for the previous numbers:
  • 66 sets with a sum of 25684
  • 66 sets with a sum of 25685
  • 103 sets with a sum of 25686
  • 37 sets with a sum of 25687
  • 74 sets with a sum of 25688
  • 74 sets with a sum of 25689
The minimal set of numbers is being used to determine the Zeckendorf representation but others configurations are possible. As the site says:
The Zeckendorf system uses the set with the fewest Fibonacci numbers in it. What about choosing that set with the most Fibonacci numbers with a sum of n, each Fibonacci number being used at most once? This is called the maximal Fibonacci bit representation. "Bit" means that the only digits in the representations are 0 and 1. Zeckendorf's is therefore the minimal Fibonacci bit representation.
For 25684, the maximal set is 

{1, 3, 5, 13, 21, 34, 55, 89, 144, 233, 610, 987, 1597, 4181, 6765, 10946}

This consists of 16 numbers and can be found using the calculator in Figure 1. Compare this with the full set of Fibonacci numbers:

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

This number would thus become \(11101110111111111101\) or \(1^301^301^{10}01\) used my superscript system described earlier. As can be seen, only three numbers are missing and thus there are only three 0's. In order to avoid confusion, the subscript MaxFib or the like should be e.g. \(25684 = 11101110111111111101_{MaxFib}\) or \(1^301^301^{10}01_{MaxFib}\). Here's some historical background:
This system is also called the Zeckendorf representation of a number after Edouard Zeckendorf who wrote about it (in French) in 1972. He proved that each representation of a number n as a sum of distinct Fibonacci numbers, but where no two consecutive Fibonacci numbers are used (and there is only one column headed "1"), is unique. However, earlier, Lekkerkerker had written about this representation in 1952 in Dutch showing that there is only one way to write a number in this system but, unfortunately for him, the system is now generally called Zeckendorf's.
In formal mathematical terms, the Zeckendorf representation can be defined as follows:

A number written as a sum of nonconsecutive Fibonacci numbers, such that$$n=\sum_{k=0}^L \epsilon_k \,F_k$$where \(\epsilon_k\) are 0 or 1 and \( \epsilon_k \times \epsilon_{k+1}=0\). Every positive integer can be written uniquely in such a form (which is in itself a particular example of a Ostrowski numeration).

Here is a link to a PDF file of an academic paper with the following abstract:
Three contrasting polyphonic musical compositions based on Zeckendorf representations in the style of music characterised by Fibonacci numbers and the golden ratio are presented and analysed.

Wednesday 24 July 2019

Multiperfect, Hyperfect and Superperfect Numbers

Today I stumbled upon the term abundancy, as applied in a mathematical sense to the abundancy of a number and defined as the ratio:$$ \frac{\sigma(n)}{n} \text{ where } \sigma(n) \text{ is the divisor function}$$For \(n=1, 2, ...\), the first few values are:$$1, 3/2, 4/3, 7/4, 6/5, 2, 8/7, 15/8, 13/9, 9/5, 12/11, 7/3, 14/13, ...$$It's interesting to look at the approximate decimal value of this ratio as the numbers range from one up to a million. My analysis using SageMathCell revealed the following records for the maximum abundancy:
  • 60         -->     14/5 \( \approx \) 2.80000000000000 between 1 and 100
  • 840        -->   24/7 \( \approx \) 3.42857142857143 between 1 and 1000
  • 5040      -->   403/105 \( \approx \) 3.83809523809524 between 1 and 10000
  • 55440    -->   1612/385 \( \approx \) 4.18701298701299 between 1 and 100000
  • 720720  -->   248/55 \( \approx \) 4.50909090909091 between 1 and 1000000

If this ratio turns out to be a positive integer, then \(n\) is said to be a multiperfect number. The first few are:$$1, 6, 28, 120, 496, 672, 8128, ...$$corresponding to the abundancies of: $$1, 2, 2, 3, 2, 3, 2, 4, 4, ... $$So a formal definition of a multiperfect number might be that a number \(n\) is \(k\)-multiperfect (also called a \(k\)-multiply perfect number or \(k\)-pluperfect number) if: $$ \sigma(n)=kn \text{ for some integer } k \geq 2$$The value of \(k\) is called the class. The special case \(k=2\) corresponds to perfect numbers \(P_2\). Source. Figure 1 shows the first few examples of such classes with the second column representing the associated OEIS reference:

Figure 1

Let's move on to hyperperfect numbers. A number \(n\) is called \(k\)-hyperperfect if$$n=1+k \, \sum_i d_i=1+k \,(\sigma(n)-n-1)$$where \( \sigma(n)\) is the divisor function and the summation is over the proper divisors with \(1<d_i<n\). Source. Figure 2 shows a table of the first few hyperperfect numbers:

Figure 2

As can be seen, the \(k\)-hyperperfect numbers reduce to the perfect numbers when \(k=1\) and the multiperfect numbers when \(k=2\). For other values of \(k\), the two sets of numbers differ. 

Just to confuse matters further, Figure 3 shows a diagram with other types of numbers that are related to abundance. As can be seen, the terms perfect, colossally abundant, superior highly composite, superabundant, highly composite, primitive abundant, highly abundant, deficient and abundant are used. 


Figure 3: source

Some of these I'm already familiar with and relevant posts include:

In following the source of the image that I used in Figure 3, I came across another class of numbers called superperfect numbers. A superperfect number is defined by this source as a positive integer \(n\) that satisfies:$$\sigma^2(n)=\sigma(\sigma(n))=2n$$The first few superperfect numbers are:$$2, 4, 16, 64, 4096, 65536, 262144, 1073741824, ...$$which is OEIS A019279. The comment is made that:
If \(n\) is an even superperfect number, then \(n\) must be a power of \(2\), \(2k\), such that \(2^{k+1} − 1\) is a Mersenne prime. It is not known whether there are any odd superperfect numbers. An odd superperfect number \(n\) would have to be a square number such that either \(n\) or \( \sigma(n) \) is divisible by at least three distinct primes. There are no odd superperfect numbers below \(7×10^{24}\). 
Perfect and superperfect numbers are examples of the wider class of \(m\)-superperfect numbers, which satisfy:$$ \sigma^m(n)=2n \text{ with }m=1 \text{ and } 2$$For \(m \geq 3\) there are no even \(m\)-superperfect numbers. The \(m\)-superperfect numbers are in turn examples of \((m,k)\)-superperfect numbers which satisfy:$$ \sigma^m(n)=kn$$With this notation, perfect numbers are \((1,2)\)-perfect, multiperfect numbers are \((1,k)\)-perfect, superperfect numbers are \((2,2)\)-perfect and \(m\)-superperfect numbers are \((m,2)\)-perfect numbers. Examples are shown in Figure 4.
Figure 4

I must confess that I head is spinning with all this nomenclature so I'll leave off there.

Sunday 21 July 2019

The Cubohemioctahedron and other Polyhedra

Figure 1: a cubohemioctahedron (source)

Today I turned 25675 days old and one of the properties of this number is that it is figurate, of the centered cubohemioctahedral variety. Specifically it is a member of OEIS A274973: centered cubohemioctahedral numbers:$$ \text{a(}n \text{)} = 2 \times n^3+9 \times n^2+n+1$$In the case of 25675, the value of \(n\) is 22. However, I had no idea what a cubohemioctahedron was and so I set about finding out.

A cubohemioctahedron is shown in Figure 1 and, where F stands for faces, E for edges and V for vertices, it is characterised by \(F = 10, E = 24\) and \(V = 12\). Naturally this shape adheres to $$ \text{Euler's Formula: } V-E+F=2$$It is an impressive shape with the indented tetrahedra (in yellow), meeting at a central point which acts as the first term (1) of the centered cubohemioctahedral numbers. It is described thus in Wikipedia:
In geometry, the cubohemioctahedron is a nonconvex uniform polyhedron, indexed as U15. Its vertex figure is a crossed quadrilateral. It is given Wythoff symbol 4/3 4 | 3, although that is a double-covering of this figure. A nonconvex polyhedron has intersecting faces which do not represent new edges or faces. In the picture vertices are marked by golden spheres, and edges by silver cylinders. It is a hemipolyhedron with 4 hexagonal faces passing through the model centre. The hexagons intersect each other and so only triangle portions of each are visible.
There are several terms is this definition that require further explanation. Firstly though, Figure 2 shows the cubohemioctahedron in the centre with the relates shapes of cuboctahedron and octahemioctahedron on the left and right:

Figure 2: source

Compare the cubohemioctahedron with the first stellation of the cuboctahedron as shown in Figure 3.

Figure 3: first stellation of the cuboctahedron (source)

In the stellation shown in Figure 3, the square and triangular faces have been stellated. If only the triangular faces were stellated then the cubohemioctahedron would represent the opposite of that. In other words, the tetrahedra would be removed rather than added. I don't want to discuss the Wythoff symbol in this post because I'd rather focus on the beauty and practical construction of these objects rather than the more abstract mathematics. 

What follows are some interesting links and resources relating to polyhedra in this post. This is an area of mathematics that has long interested me but which, for whatever reasons, I've rather neglected.
  • How To Fold It: The Mathematics of Linkages, Origami, and Polyhedra. An interesting book by Joseph O'Rourke who has a website related to this book and containing additional material. Cover photo in Figure 4.

Figure 4

  • There is a nice PowerPoint presentation titled Polyhedra in Art by George W. Hart. that looks at historical examples of polyhedra in art.


  • Amazing Origami, a book by Kunihiko Kasahara described as "a complete introduction to the mathematical theory of Origami based on the teachings of Freidrich Froebel (1782-1852) and a step-by-step guide to 33 colourful and fun paper folding projects". Cover photo in Figure 5.

Figure 5

  • A Constellation of Original Polyhedra, a book by John Montroll described as "origami expert John Montroll provides simple directions and clearly detailed diagrams for creating amazing polyhedral. Step-by-step instructions show how to create 34 different models". Cover photo in Figure 6.
Figure 6

  • Unit Polyhedron Origami, a book by Tomoko Fuse described as "With step-by-step diagrams, detailed instructions and over 70 photographs in vibrant full-color, internationally-renowned origamist and author Tomoko Fuse offers an innovative approach to origami based on assembling separate, multi-dimensional shapes into one structure". Figure 7 shows a page from the book in which a structure is made out of twenty cuboctohedra.
Figure 7

Figure 8

A space-filling polyhedron, sometimes called a plesiohedron, is a polyhedron which can be used to generate a tessellation of space. Although even Aristotle himself proclaimed in his work On the Heavens that the tetrahedron fills space, it in fact does not. Several space-filling polyhedra are in Figure 8. 
The cube is the only Platonic solid possessing this property. However, a combination of tetrahedra and octahedra do fill space. In addition, octahedra, truncated octahedron, and cubes, combined in the ratio 1:1:3, can also fill space. In 1914, Föppl discovered a space-filling compound of tetrahedra and truncated tetrahedra. 
There are only five space-filling convex polyhedra with regular faces: the triangular prism, hexagonal prism, cube, truncated octahedron. The rhombic dodecahedron and elongated dodecahedron, and trapezo-rhombic dodecahedron appearing in sphere packing are also space-fillers, as is any non-self-intersecting quadrilateral prism. The cube, hexagonal prism, rhombic dodecahedron, elongated dodecahedron, and truncated octahedron are all "primary" parallelohedra.

Well, I've made a start on this project but it's far from finished. Today I turned 25676 days old. This was kind of inevitable because yesterday I was 25675 days old but the point is that the number 25676 is associated with the stellated dodecahedron as shown in Figure 9.

Figure 9: stellated dodecahedron (source)

The dodecahedron has 20 vertices and 12 faces. In the stellated docedahedron, the faces become pentagonal pyramids and the associated 12 vertices make for a total of 32 points where edges meet. 25676 is a member of OEIS A318159: figurate numbers based on the small stellated dodecahedron: $$ \text{a(}n \text{)} = \frac{n \times (21 \times n^2 - 33 \times n + 14)}{2}$$The initial terms are:$$1, 32, 156, 436, 935, 1716, 2842, 4376, 6381, 8920, 12056, 15852, 20371, 25676, ...$$

Sunday 14 July 2019

Constants Associated with Centered Hexagonal and Other Figurate Numbers

Today I turned 25669 days old and this number happens to be the 93rd centered hexagonal number. These are figurate numbers because they can be represented as hexagonal rings surrounding a central dot. See Figure 1.

Figure 1

Centered hexagonal numbers can be written in the form \(3 \,n \, (n-1)+1\) where \(n=0,1,2,3, ... \). What struck me as interesting were some of the properties of this series which begins: 1, 7, 19, 37, 61, 91, 127, 169, 217, 271, 331, 397, 469, 547, 631, 721, 817, 919, 1027, 1141, 1261, ... I'm thankful to NumbersAplenty for alerting me to these properties. See Figure 2.

Figure 2: http://www.numbersaplenty.com/set/hex_number/

These results are quite amazing. The property on the left in Figure 2, I'll designate as property 1, the one in the middle as property 2 and the one on the right as property 3.

Property 1

Let's consider the sequence up to the 93rd hexagonal number and see how the results compare:$$ \sum_1^{93}{\frac{1}{H_n}} \approx 1.30169996966629 \text{ and } \frac{\pi \,\tanh{\frac{\pi}{2\sqrt{3}}}}{\sqrt{3}} \approx 1.50944975010619$$Given that the last term in the sequence on the left is 1/25669 \( \approx \) 0.0000389574973703689, there are clearly a great many more terms to add before the figure on the right is approached.

Property 2

By contrast, this sequence approaches 13 fairly rapidly:$$ \sum_1^{93} \frac{H_n}{2^n} \approx 12.9999999999999999999999972942$$Property 3

Notice that the summation begins at \(n=0\) and this is confusing because \(H_0\) is not really defined. It might be better to begin the summation at \(n=1\) and make the right side equal to \(4e-1\). In this case, the summation on the left again rapidly approaches the value on the right (not surprising in view of the factorial in the denominator):$$ \sum_1^{93} \frac{H_n}{n!} = 4e -1\text{ to at least 100 decimal places}$$There are interesting results for the sums of the reciprocals of other figurate numbers. Some of these are shown in Figure 3 (heptagonal), Figure 4 (octagonal) and Figure 5 (decagonal).


Figure 3: http://www.numbersaplenty.com/set/heptagonal_number/



Figure 4: http://www.numbersaplenty.com/set/octagonal_number/


Figure 5: http://www.numbersaplenty.com/set/decagonal_number/

There are plenty more but that's enough for the moment. In the meantime, the centered hexagonal and other figurate numbers have been shown to be linked to the mathematical constants \(\pi \) and \(e\), yet another example of the connectivity of numbers that I discussed in my previous post.

Saturday 13 July 2019

The Connectivity of Numbers

Figure 1
I thought it time to summarise what I've learned thus far about the number properties that I'll term intrinsic. By this term, I mean number properties that are not dependent on the number base used to represent the number. For example, 25652 is a palindromic number in base 10 but Figure 1 shows that this is not the case for the other bases from 2 to 16. Examples of intrinsic number properties would be the number of prime factors and the number of divisors. For example, 25652 factors to \(2^2 ⋅ 11^2 ⋅ 53\) and it has 18 divisors (1, 2, 4, 11, 22, 44, 53, 106, 121, 212, 242, 484, 583, 1166, 2332, 6413, 12826 and 25652). These factors and divisors are the same numbers in any number base.

The sum of the digits of a number is another example of a number property that is not intrinsic. In the case of 25652, the digit sum is 20. However, in base 8 the number is 62064 and the digit sum is \(22_8\), which is 18 in base 10. Contrast this with the sum of the prime factors of 25652 in bases 10 and 8 (ignoring multiplicity). In base 10, the sum is 66. In base 8, the factors are \(2_8\), \(13_8\) and \(65_8\) and so the sum is \(102_8\) or 66 in base 10. So having clarified the difference between intrinsic and base-dependent number properties, what are some of the most important properties of the former type of numbers?

I'll continue using 25652 as an example. To begin the divisors, and particularly the prime divisors, are all important. For 25652, as already noted, the divisors are:$$1, 2, 4, 11, 22, 44, 53, 106, 121, 212, 242, 484, 583, 1166, 2332, 6413, 12826, 25652$$The prime divisors are \( 2, 2, 11, 11, 53 \) and these uniquely define the number. 25652 has an interesting property that does not relate to its own divisors but instead relates to the proper divisors of other numbers. 25652 is an untouchable number, because it is not equal to the sum of proper divisors of any number. The proper divisors of 25652 are 1, 2, 4, 11, 22, 44, 53, 106, 121, 212, 242, 484, 583, 1166, 2332, 6413, 12826 and these add to 25137. This means that 25137 is not an untouchable number because it can be formed from the addition of the proper divisors of 25652. This talk of adding up divisors leads us on to the sigma function.

The sigma function can be used to find the number of divisors, the sum of these divisors, the sum of the squares of these divisors, the sum of the cubes of these divisors and so on. So-called sigma zero, written as \( \sigma_0\), returns the number of divisors or the sum of the divisors raised to the zero power. \( \sigma_1\) returns the sum of the divisors raised to the first power and so on. This is the result:

\( \sigma_0(25652)=18\)
\( \sigma_1(25652)=50274\)
\( \sigma_2(25652)=871164630\)
\( \sigma_3(25652)=19267967775942\)
Also of interest is the count of numbers that are relatively prime to 25652 where 1 is regarded as being relatively prime to all numbers. This is known as the totient of the number and can be written as \( \phi=11440 \). All multiples of 2, 11 and 53 (and 25652 itself) will be excluded from this count. For prime numbers, the totient will always be one less than the number itself. For example, 25667 is prime and its totient is 25666.

Moving along, we note that some numbers are so-called square numbers. An example of such a number is 25600 which is equal to the square of 160. Visually, this number could be represented as shown in Figure 2.

Figure 2

In the case of 25652, it is not a square number but it can be represented a sum of two squares, since$$25652=23716 + 1936 = 154^2 + 44^2 $$So, visually, the number could be represented as shown in Figure 3:

Figure 3

Only certain numbers can be represented as a sum of two squares. If a number has a 4k+3 prime factor that is raised to an odd number (1, 3, 5, .. ), then it cannot be represented as a sum of two squares. Most numbers can be represented as sum of three squares, provided that there is not a remainder of 7 when the number is divided by 8. 25652 gives a remainder of 4 when divided by 8 and it can be represented as a sum of three squares in 20 different ways as shown in Figure 4:

Figure 4
Figure 5

Visually, the nineteen triplets in Figure 4 that contain no zeroes, could be used as the sides of three squares, to represent 25652. The same approach can be used for cubes. For example:$$25665=11^3+23^3+23^3$$Rather less frequently, a number can be represented as a sum of two cubes. For example:$$25720 = 11^3 + 29^3 $$Such numbers can be envisaged as comprising three cubes (in the case of 25665) or two cubes (in the case of 25720). See Figure 5 for a not-to-scale representation of 25720.

In my previous post, I considered the seed numbers that would be needed to make a number a part of a Fibonacci sequence. In the case of 25652, these numbers would be 52 and 146, producing the sequence:$$25652,15854,9798,6056,3742,2314,1428,886,542,344,198,146,52$$Similarly, the three seed numbers for 25652 to be part of a tribonacci sequence are 10, 30 and 63, producing the sequence:$$25652,13947,7583,4122,2242,1219,661,362,196,103,63,30,10$$So I could go on but I'll leave off there and try to summarise things via Figure 6.

Figure 6

Friday 12 July 2019

Finding Fibonacci and Tribonacci Seed Numbers

Today I turned 25667 days old. This number is prime but there is little of interest to be found concerning its properties in either the OEIS or NumbersAplenty, my usual resources. For a while now, the idea that every number could be considered as being part of a Fibonacci sequence has been knocking around in my head.

Today the idea came into focus when I started to look at 25667 in this light. I knew that the ratio of consecutive terms in a Fibonacci sequence approached closer and closer to the Golden Ratio as the terms got larger. I figured I'd use this property to find the previous term.$$ \frac{25667}{\frac{1+ \sqrt {5}}{2}} \approx 15863.0783892436$$Rounding to the nearest whole number gives 15863 and from there it is easy to reverse engineer the remaining terms until a point is reached where the previous term is larger than the subsequent term. This is the point at which the algorithm I developed will stop.

Here is the SageMathCell permalink to the algorithm and Figure 1 shows a screenshot of the SageMath code.

Figure 1

The sequence of Fibonacci terms is:

25667 15863 9804 6059 3745 2314 1431 883 548 335 213 122 91 31

The two seed numbers are 31 and 91. Different numbers produce different sequences, even when only differing by 1. Consider the sequences for the two previous numbers: 25666 and 25665.

25666 15862 9804 6058 3746 2312 1434 878 556 322 234 88

25665 15862 9803 6059 3744 2315 1429 886 543 343 200 143 57

Of course, changing the manner in which the immediate predecessor of the starting number is calculated can affect the sequence. Suppose instead of rounding the decimal number, we simply truncated it, discarding the decimal part and leaving only the whole number. In the examples cited, the sequence remains the same for 25667 and 25666 but there is a difference in the case of 25655.

25665 15861 9804 6057 3747 2310 1437 873 564 309 255 54

The reason is that the decimal number is 15861.8423212660, so that rounding produces 15862 whereas truncating produces 15861. I think rounding is the better way to calculate the immediate predecessor of the starting number because this gives a result that is closest to the Golden Ration when the two numbers are compared. This benefit is clearly seen when a number from the classic Fibonacci sequence is entered e.g. 6765.

6765 4181 2584 1597 987 610 377 233 144 89 55 34 21 13 8 5 3 2 1 
(using rounding)

6765 4180 2585 1595 990 605 385 220 165 55 
(using truncation)

Now every number can be associated with two seed numbers so that the three of them form part of a Fibonacci sequence.



Of course, the idea can be extended to tribonacci numbers with a slight modification of the code. Information about the tribonacci constant can be found here. Here is a permalink to the SageMathCell code and Figure 2 shows a screenshot of the SageMath code:

Figure 2

The sequence of tribonacci terms is:

25667 13955 7587 4125 2243 1219 663 361 195 107 59 29 19 11

So every number can be associated with three tribonacci seed numbers.


Thursday 11 July 2019

Sphenic Brick Trajectories

I've made mention of sphenic numbers in three earlier posts. Specifically:
I've long championed the association between the surface area of a sphenic brick and its volume. Consider a sphenic number such as 170 that factors to 2 * 5 * 17. It can be considered to represent a rectangular prism with volume 170 cubic units and dimensions of 2, 5 and 7 units. The surface area of such a prism is 258 square units. In previous posts, I've examined the ratio of surface area to volume but today a thought struck me. What if the surface area itself in a sphenic number? This would mean that the surface area could be linked to another rectangular prism.

This is indeed the case for 170 because its surface area of 258 = 2 * 3 * 43 and can thus be linked to a prism with volume of 258 cubic units and dimensions of 2, 3 and 43 units. This prism has a surface area of 442 square units. The obvious question is: can this process be continued? Well 442 = 2 * 13 * 17 and so the answer is yes. The resulting prism has a surface area of 562 square units but 562 = 2 * 281 and so this is where things stopped.

I then got to thinking about the maximum number of iterations possible up to a certain limit. To investigate this, I needed to develop a robust algorithm and I spent most of the day tinkering with one. In the end, using SageMathCell, I succeeded. Here's a permalink to the coding window and below is the code, showing runs of eight up to 10,000:

INPUT 
run=8
V=[];W=[]
for n in [1..10000]:
    if len(divisors(n))==8 and len(list(factor(n)))==3:
        V.append(n)
for v in V:
    area=1
    w=v
    count=0
    W.append(v)
    while area<>0:
        if len(divisors(w))==8 and len(list(factor(w)))==3:
            F=list(factor(w))
            G=[]
            for f in F:
                G.append(f[0])
            area=2*(G[0]*G[1]+G[0]*G[2]+G[1]*G[2])
            count+=1
        else:
            area=0
        if area <>0:
            W.append(area)
        else:
            W.append(count)
        w=area
for i in range(0,len(W)):
    if W[i]==run:
        for x in [1..run+1]:
            print W[i-x],
        print 
OUTPUT 

25642 22882 22042 20194 19018 18178 12970 12322 7386
17902 16942 15502 14734 14062 12142 11086 10414 8078
25642 22882 22042 20194 19018 18178 12970 10066 9514
17902 16942 15502 14734 14062 12142 9422 5646 9515
25642 22882 22042 20194 19018 18178 12970 12322 9562

I'm sure professional coders would look in horror at my approach but at least it works. Given that the smallest sphenic number is 30, the count of iterations serves as a marker to identify where a run of a certain length occurs. To identify the runs of eight as in the example above, simply enter run=8 and then go back nine entries in the list. So starting with 7386, there is then a run of eight sphenic numbers generated by the volume-area iteration. The run ends at 25642 which is not a sphenic number. Similarly for the other chains shown and it should be noted that several chains merge into others. For example, 7386, 9514 and 9562, all end with 25642. So, how many iterations are possible? Well, up to one million, there are three chains of 14 iterations, all ending in 320746:

320746 307474 219610 210466 205834 200962 198442 182482 130330 110242 105562 103282 99322 94546 92314
320746 307474 219610 210466 205834 200962 198442 182482 130330 110242 105562 103282 99322 94546 92714
320746 307474 219610 210466 205834 200962 198442 182482 130330 110242 105562 103282 99322 97282 95146

SageMathCell timed out above one million so there may well be longer chains out there but for the moment I haven't discovered them. I've used the terms "iterations", "runs" and "chains" for these sets of related sphenic numbers but the term "trajectory" struck me as most appropriate and that's why I've used it in the title of this post. The Collatz trajectory comes to mind as perhaps the most famous trajectory that I know of in number theory.

Saturday 6 July 2019

Visualisation of Semiprimes

I've written previously about semiprimes in varying contexts. These posts are listed below:
I was prompted to make yet another post about them because today I turned 25661 days old and was little of interest to found about this number in either the OEIS, Numbers Aplenty or any other sources. However, it is a semiprime, being a product of 67 and 383. I thought I'd examine the number is a more detailed, two dimensional way. Figure 1 illustrates my approach.

Figure 1

I've revisited some old territory in the notes contained in Figure 1 which I've reproduced below:
The number 25661 is a semiprime because it has prime factors of 67 and 383. It can be visualised in two dimensions as a rectangle with a width of 67 units and length of 383 units. As such, its area of course is 25661 square units and its perimeter is 900 units. The ratio of the rectangle's width to its length is thus 67 383 or approximately 0.17493 and the ratio of length to width is 383: 67 or approximately 5.7164. The length of the diagonal of this rectangle is approximately equal to 388.8. The area of the rectangle is equivalent to the sum of the areas of 62 different combinations of three squares. An example is shown where the three squares has sides of 86 units, 92 units and 99 units.
By "old territory", I mean the semiprime is envisioned as a rectangle whose width and length are the smaller and larger prime factors whose product is the area of the rectangle. Thus the integers 900 and 25661 are related via a gematria-like connection. The ratio of the sides produce two other related numbers, both rational, and this case:$$ \frac{67}{383} \approx 0.17493 \text{ and its reciprocal } \frac{383}{67} \approx 5.7164$$What's new is that I've considered the length of the rectangle's diagonal which is an irrational number and equal to \( \sqrt {67^2+383^2} = \sqrt {151178} \approx 388.8162 \).

Finally, I've used the fact that 25661 can be expressed a sum of three squares in 62 different ways to represent the rectangle as being equivalent in area to the sum of any of these three squares. In Figure 1, I've used the example of:$$86^2+92^2+99^2=67 \times 383 =25661$$The square numbers correspond to \( 86^2, 92^2 \text{ and } 99^2 \text{ are } 7396, 8464 \text{ and } 9801 \text{ respectively }\). There are another 61 sets of such triplets that can be linked visually with the rectangular representation of 25661. See Figure 2:

Figure 2