Sunday, 25 August 2019

The PrimeLatz Conjecture

The PrimeLatz Conjecture is so named in deference to and because of its similarity to the Collatz Conjecture that I've written about in earlier posts, namely:
The so-called Collatz Trajectory refers to the sequence of numbers generated by the following rule. Start with any positive integer. If the number is even, divide it by 2. If the number is odd, multiply by 3 and add 1. The conjecture is that the sequence of numbers thus generates will always lead to 1. So far, no exceptions have been found.

The PrimeLatz Trajectory is similar except that for odd numbers, the rule is to add the next three primes to the number. This will always generate an even number that is then divided by 2. The PrimeLatz Conjecture is that the sequence of numbers thus generated will always lead to a loop.

Take the case of 82. Here is the sequence:

82 41 184 92 46 23 120 60 30 15 74 37 168 84 42 21 104 52 26 13 72 36 18 9 50 25 122 61 272 136 68 34 17 88 44 22 11 60 ...

The sequence repeats after 11 is reached. Because 11 is odd, the next three primes are added. Thus 11 + 13 + 17 + 19 = 60 but 60 was reached earlier when 120 was divided by 2. Let's take another example, this time 84. The sequence is:

84 42 21 104 52 26 13 72 36 18 9 50 25 122 61 272 136 68 34 17 88 44 22 11 60 30 15 74 37 168 84 ...


Most numbers fall into a loop fairly quickly but what's of interest are those numbers that are more stubborn, such as 83. I deliberately chose numbers that were one above and one below 83 to emphasise the difference. Here is what the OEIS says about the behaviour of 83 where \(a(n)\) represents the sequence of terms:
Most small initial values have a very small orbit of few more than the 30 elements of the loop. 
N = 83 = a(0) is the most remarkable exception (having an orbit of 16180 + 30 elements), which motivates this sequence.  
N = 443 = A293978(0) is another exception, with an orbit of 9066+30 elements, and N = 209 also has a comparatively large orbit of 941 + 30 elements, distinct from those of 83 and 443.
The initial value a(0) = 83 is odd, so we add to 83 the next 3 primes (89, 97 and 101) to get a(1) = 370. 
370 is even, so we divide by 2 to get a(2) = 185, and so on. 
After 8337 iterations, we get a(8337) = 10780054699424618132644155893087038044817868609971935265882538442720. 
This is the largest value we will reach. Since this is even we divide by 2 to get a(8338). The result a(8338) is again even, so we divide by 2 once more to get a(8339), and so on... 
After iteration 16171, we reach a(16171) = 768. The next 8 iterations consist in dividing by 2, until we get a(16179) = 3. Since this is odd, we add the next three primes (5, 7 and 11) to reach a(16180) = 26 = A193230(14). This is an element of the loop: 30 iterations later, we get again 26, and the sequence has become periodic.
All numbers less than 100 million eventually fall into the following loop:
9,50,25,122,61,272,136,68,34,17,88,44,22,11,60,
30,15,74,37,168,84,42,21,104,52,26,13,72,36,18

ADDENDUM 10th May 2020:

I'm now approaching my 26000th day on Earth and I've noticed that, in the orbit of 83, there is a cluster of numbers between 25000 and 31000 with wide gaps on either side. Figure 1 shows what I mean:

Figure 1

There is a gap of over 10000 from 15456 to 25710 and then a gap of over 20000 from 30912 to 51536. As I write this on the 10th May 2020, I'm 25970 days old and this number is in the 83 orbit. There are a total of 54 numbers that fall in the range from 25710 to 30912.

The full orbit of 83 can be viewed, in comma-delimited format, by following this link (it's 176 pages long):

https://docs.google.com/document/d/1uP-sBqDNjbhkEqK8IEDG-doN2QeYXnq0K8QObWkzPWU/edit?usp=sharing


Thursday, 22 August 2019

Binomial Transforms

My diurnal age today was 25706 and one of the properties of this number, as listed in the Online Encyclopaedia of Integer Sequences (OEIS), is that it belongs to OEIS A101509:  binomial transform of tau(n) (see A000005). Now \( \tau (n) \) is the divisor function and returns the number of divisors for any given number \(n\). OEIS A000005 gives the members of this sequence, beginning with \(n=1\):
1, 2, 2, 3, 2, 4, 2, 4, 3, 4, 2, 6, 2, 4, 4, 5, 2, 6, 2, 6, 4, 4, 2, 8, 3, 4, 4, 6, 2, 8, 2, 6, 4, 4, 4, 9, 2, 4, 4, 8, 2, 8, 2, 6, 6, 4, 2, 10, 3, 6, 4, 6, 2, 8, 4, 8, 4, 4, 2, 12, 2, 4, 6, 7, 4, 8, 2, 6, 4, 8, 2, 12, 2, 4, 6, 6, 4, 8, 2, 10, 5, 4, 2, 12, 4, 4, 4, 8, 2, 12, 4, 6, 4, 4, 4, 12, 2, 6, 6, 9, 2, 8, 2, 8, ...
The binomial transform when applied to OEIS A000005 produces OEIS A101509:
1, 3, 7, 16, 35, 75, 159, 334, 696, 1442, 2976, 6123, 12562, 25706, 52492, 107014, 217877, 443061, 899957, 1826078, 3701783, 7498261, 15178255, 30706320, 62085915, 125465715, 253415981, 511608490, 1032427637, 2082680887, 4199956101, 8467124805, 17064784905, 34382825363, 69256687719, 139465867773, ...
As can be seen, the terms of the second sequence get large fairly quickly as each term in the first sequence is mapped an increasingly larger term in the second. In particular, the 13th term (2) in the first gets mapped to 25706 in the second. But what is a binomial transform?

To quote from Wikipedia:
In combinatorics, the binomial transform is a sequence transformation (i.e., a transform of a sequence) that computes its forward differences. It is closely related to the Euler transform, which is the result of applying the binomial transform to the sequence associated with its ordinary generating function.

The binomial transform, \(T\), of a sequence, {\(a_n\)}, is the sequence {\(s_n\)} defined by:$$s_n = \sum_{k=0}^n {n\choose k} a_k$$ 
Figure 1 shows some SageMath code that accepts the terms of a sequence as input and outputs the terms arising from the binomial transform of the input terms:

Figure 1: source

Figure 2 shows the above code applied to two different sequences, firstly the sequence of divisors of the natural numbers and then the sequence consisting only of 1's.

Figure 2

I'd like to find some practical applications of binomial transforms and also investigate the Euler transform in more depth.

Monday, 19 August 2019

Euler Bricks

Figure 1
Having posted several times about "sphenic bricks", I came across the term "euler bricks" today in the context of the number \( 25704 = 2^3 \times 3^3 \times 7 \times 17 \) which represents my diurnal age. Here is the entry in OEIS A031173 to which 25704 belongs:
Longest edge \(a \) of smallest (measured by the longest edge) primitive Euler bricks such that \( a \), \( b \), \(c\), \( \sqrt {a^2 + b^2}, \sqrt {b^2 + c^2}, \sqrt {a^2 + c^2}\) are all integers. 
240, 275, 693, 720, 792, 1155, 1584, 2340, 2640, 2992, 3120, 5984, 6325, 6336, 6688, 6732, 8160, 9120, 9405, 10725, 11220, 12075, 13860, 14560, 16800, 17472, 17748, 18560, 19305, 21476, 23760, 23760, 24684, 25704
Figure 1 shows the list of primitive numbers, up to 25704, with \(c<b<a\). In the case of 25704, the face diagonals are 31080, 17497, and 25721. Looking at Figure 1, it can be seen that there are five primitive Euler bricks with dimensions under 1000 and ten if primitive and non-primitive are included. It can be shown that if \(a\), \(b\) and \(c\) are the sides of an Euler brick then \(ka\), \(kb\) and \(kc\) with \(k\) any positive integer also form such a brick and interestingly, the sides \(ab\), \(bc\) and \(ac\) as well. The five primitive Euler bricks are depicted in Figure 2.


Figure 2: source

A perfect Euler brick is (to quote from Wikipedia):
An Euler brick whose space diagonal also has integer length. In other words, the following equation is added to the system of Diophantine equations defining an Euler brick:
\(a^{2}+b^{2}+c^{2}=g^{2}\) where \(g\) is the space diagonal. As of July 2019, no example of a perfect cuboid had been found and no one has proven that none exist.
Figure 3 illustrates this:

Figure 3: source
To quote again from Wikipedia:
An almost-perfect cuboid is defined as a cuboid that has 6 out of the 7 lengths as rational. Such cuboids can be sorted into three types, called Body, Edge, and Face cuboids. In the case of the Body cuboid, the body (space) diagonal \(g\) is irrational. For the Edge cuboid, one of the edges \(a\), \(b\), \(c\) is irrational. The Face cuboid has just one of the face diagonals \(d\), \(e\), \(f\) irrational. The Body cuboid is commonly referred to as the Euler cuboid in honor of Leonard Euler, who discussed this type of cuboid. He was also aware of Face cuboids, and provided the (104, 153, 672) example.
The smallest solutions for each type of almost-perfect cuboids, given as edges, face diagonals and the space diagonal (\(a, b, c, d, e, f, g\)):
  • Body cuboid: (44, 117, 240, 125, 244, 267, √73225)
  • Edge cuboid: (520, 576, √618849, 776, 943, 975, 1105)
  • Face cuboid: (104, 153, 672, 185, 680, √474993, 697) 

Wednesday, 7 August 2019

Lines and Triangles

Consider the following problem as shown in Figure 1.


Figure 1

I just stumbled upon this problem, or rather a generalisation of this problem, and thought its solution was worthy of a mention. The solution was quite simple once I read it. Let's first review what the diagram shows. There are three parallel lines (labelled 1, 2 and 3) and another five non-parallel lines (labelled 4 to 8) that intersect with each other and also with the parallel lines. No three lines pass through a single point. How many triangles are formed?

Let's break the problem into two parts. Firstly let's deal with the five non-parallel lines. It takes three lines to make a triangle and so there are$$ \binom 5 3 = \binom 5 2 =\frac{5 \times 4}{2 \times 1}= 10 \text { possible combinations}$$So the five non-parallel lines form 10 triangles with each other. The three parallel lines can each be linked to a pair of non-parallel lines. This becomes:$$ \binom 5 2 \times 3 = 10 \times 3 = 30 \text{ possible combinations}$$So in total there are \(10 + 30 = 40\) triangles formed.

Generalising this, if there are \( n \) non-parallel lines and \(m\) parallel lines then:$$\text {The number of triangles formed is given by } \binom n 3 + \binom n 2 \times m$$Of course if none of the lines are parallel then \(m=0\) and the expression simplifies accordingly. It's interesting to count the number of points as well (shown in Figure 2):


Figure 2

The intersection of the lines produces 25 points, which I dutifully counted and labelled. If the points are taken in pairs, then each pair will generate a line with the result that there will be \( \binom {25} 2 = \frac {25 \times 24}{2 \times 1}=300\) lines which is clearly not the case because many of the lines are the same as others due to the large number of collinear points. 

However it can be noted that when two lines intersect, a point is created and so the following expression arises:$$ \binom 5 2 + 5 \times 3 = 10 + 15 =25 \text { which confirms my manual count}$$This can be generalised to:$$ \text {The number of points is given by }\binom n 2 + n \times m$$

Monday, 5 August 2019

De Polignac Numbers


Today I turned 25691 days old and one of the properties of this number is that it's a de Polignac number. Moreover, it's the smaller of a pair of such numbers with the larger member of the pair being 25693. Numbers Aplenty must hold these numbers in high regard because, for every odd number searched for, it makes a point of declaring whether it is de Polignac or not. Figure 1 and Figure 2 illustrate this.


Figure 1: screenshot from source showing that
25689 is not a de Polignac number


Figure 2: screenshot from source showing that
25691 is a de Polignac number

Numbers Aplenty defines a de Polignac number as follows:
A de Polignac number is an odd number \(n\) that cannot be expressed as \(n=2^k+p\), for \(p\) prime.
This definition is equivalent to there being no prime \(p=n-2^k\) for values of \(2^k<n\). In the case of \(25689\), it is shown that \(2^4\) when subtracted from \(25689\) produces the prime \(25673\). Therefore \(25689\) is not a de Polignac number. In the case of \(25691\), it looks as if the expression \(2^k-25691\) should be reversed and instead read \(25691-2^k\).

Some interesting facts about de Polignac numbers include:
  • There are many de Polignac consecutive odd numbers that differ by 2. The earliest ones are: 905 & 907. Others are 3341 & 3343; 3431 &3433; and so on. However, there are no de Polignac twin primes. Source.
  • In the interval 5 to 50,000,000 there are about 21.8% (477445/2188591) of de Polignac numbers that are prime and this number slowly decreases. Thus composite de Polignac are more abundant than prime de Polignac. Source.
  • Paul Erdös proved that there are an infinity of de Polignac numbers, for example all the numbers of the form 1260327937 + 2863311360⋅\(k\). Source.
  • The smallest composite de Polignac number is 905, while the first square is 40401. Source.
  • The smallest 3 × 3 magic square whose entries are de Polignac numbers is shown in Figure 3. Source.
    Figure 3: magic square of de Polignac numbers
  •  \(10^{999} +18919\) is the earliest titanic Polignac prime number. The next are:
\(10^{999} + 25561\)
\(10^{999} + 28047\)
\(10^{999} + 28437\)
\(10^{999} + 41037\)
\(10^{999} + 55587\)
\(10^{999} + 63177\)
\(10^{999} + 73209\)
\(10^{999} + 75301\)
\(10^{999} + 90079\)
Source
  • \(2^{2^n} - 5\) is a de Polignac number for each n > 2 e.g. 251, 65531, 4294967291, ... Source.
Here are some biographical details concerning the mathematician after whom these numbers are named. Source.
Alphonse de Polignac (1826–1863) was a French mathematician. In 1849, the year he was admitted to Polytechnique, he made what's known as Polignac's conjecture
For every positive integer \(k\), there are infinitely many prime gaps of size \(2k\). The case \(k = 1\) is the twin prime conjecture. 
His father, Jules de Polignac (1780-1847) was prime minister of Charles X until the Bourbon dynasty was overthrown (1830).
Here a permalink to SageMathCell and below is the SageMath code that I developed to identify de Polignac numbers within a given range (in the example, between 25500 and 25600):
INPUT 
upper=26000
power=ceil(log(upper, 2))
NP=[]
for p in prime_range(2, upper):
    for k in [0..power]:
        if (2^k+p)<upper:
            NP.append(2^k+p)
N=[x for x in [1..upper]]
for x in (Set(N)-Set(NP)):
    if x%2==1:
        if x>25600 and x<26000:
            print x, 
OUTPUT 
25627 25631 25691 25693 25723 25739 25747 25753 25777 25783 25799 25829 25841 25909 25925 25961 25979 25987 25993

Sunday, 4 August 2019

Weird Numbers


Today I turned 25690 days old and this number is weird. Every weird number is abundant, meaning that the sum of its proper divisors exceeds the number itself. In the case of 25690, its proper divisors are 1, 2, 5, 7, 10, 14, 35, 70, 367, 734, 1835, 2569, 3670, 5138 and 12845. These sum to 27302. For an abundant number, there is generally a subset of the proper divisors whose sum equals the number. In such cases, the number is described as pseudoperfect or semiperfect. For a perfect number, such as 6, the sum of the proper divisors (1, 2 and 3) equals the number. In rare instances, there is no subset of proper divisors that sum to the number and in such cases the number is described as weird.

Here is the list of weird numbers below 30000:

70, 836, 4030, 5830, 7192, 7912, 9272, 10430, 10570, 10792, 10990, 11410, 11690, 12110, 12530, 12670, 13370, 13510, 13790, 13930, 14770, 15610, 15890, 16030, 16310, 16730, 16870, 17272, 17570, 17990, 18410, 18830, 18970, 19390, 19670, 19810, 20510, 21490, 21770, 21910, 22190, 23170, 23590, 24290, 24430, 24710, 25130, 25690, 26110, 26530, 26810, 27230, 27790, 28070, 28630, 29330, 29470

Coincidentally, I'm 70 years of age at the moment and 70 is the first weird number. So today I'm a weird number of days old and a weird number of years old!

As can be seen, weird numbers are not all that frequent and in fact there are only 57 such numbers up to 30000, representing a frequency of about 0.19%. The numbers shown are all even. It is not known if there are any odd weird numbers but if there are, it's been shown that they must be very large.


I've mentioned weird numbers before, in my post Zumkellar Numbers, Half Zumkellar Numbers and Pseudoperfect Numbers where I wrote on Thursday, 22nd November 2018:
While nearly all abundant numbers are pseudoperfect, some aren't. These numbers are termed weird and comprise OEIS A006037: weird numbers - abundant (A005101) but not pseudoperfect (A005835). From the comments to this sequence in the OEIS, we find:
Deléglise (1998) shows that abundant numbers have asymptotic density < 0.2480, resolving the question which he attributes to Henri Cohen of whether the abundant numbers have density greater or less than 1/4. The density of pseudoperfect numbers is the difference between the densities of abundant numbers (A005101) and weird numbers (A006037), since the remaining integers are perfect numbers (A000396), which have density 0. Using the first 22 primitive pseudoperfect numbers (A006036) and the fact that every multiple of a pseudoperfect number is pseudoperfect it can be shown that the density of pseudoperfect numbers is > 0.23790.
There are other interesting facts mentioned in the comments, including:
  • The first weird number that has more than one decomposition of its divisors set into two subsets with equal sum (and thus is not a member of A083209) is 10430:
  1+5+7+10+14+35+298+10430 = 2+70+149+745+1043+1490+2086+5215
  2+70+298+10430 = 1+5+7+10+14+35+149+745+1043+1490+2086+5215.
  • A weird number \(n\) multiplied with a prime \(p> \sigma(n) \) is again weird. Primitive weird numbers (A002975) are those which are not a multiple of a smaller term, i.e., don't have a weird proper divisor.
  • No odd weird number exists below \(10^{21}\).
The primitive weird numbers up to 30000 are:

70, 836, 4030, 5830, 7192, 7912, 9272, 10792, 17272

From this we can note that 25690 = 70 x 367 where 367 \(> \sigma(70)\) = 144. The next weird number 26110 = 70 x 373.