Thursday, 26 October 2023

A Puzzle

Figure 1 shows the problem that confronted me over the breakfast table this morning.


Figure 1

As I've said before, I dislike this format and what we should say is that we say that we have a function \(f(x)\) that maps \(x\) to \(y\):

  • \(f(1)=3\)
  • \(f(2)=3\)
  • \(f(3)=5\)
  • \(f(4)=4\)
  • \(f(5)=4\)
  • \(f(6)= \, \, ?\)
I'll make a small adjustment here so that the graph has \(x\) coordinates that correspond. It looks like this with the answer of \(f(6)=6\) added which I'll explain and Figure 1 shows the result:
  • \(f(0)=1\)
  • \(f(1)=3\)
  • \(f(2)=3\)
  • \(f(3)=5\)
  • \(f(4)=4\)
  • \(f(5)=4\)
  • \(f(6)= 6 \)

Figure 1: permalink

As can be seen from the graph the pattern repeats once \( (5, 4) \) is reached. Figure 2 is the pattern expanded.


Figure 2: permalink

What is the formula to represent the numbers as part of a recurrent series given by \( a(n) \) = ... ? Can the graph be expressed in terms of \(y=f(x) \) for some function \(f\)? These are two interesting questions that I should try to answer. Once I crack it, I'll post the information here and maybe a link to a new blog post about how I cracked it.

Tuesday, 24 October 2023

Prime Digits

One of the more obvious properties of 27232, my diurnal age today, is that all its digits are prime. Numbers whose digits contain only prime digits belong to OEIS A046034. The sequence begins:

2, 3, 5, 7, 22, 23, 25, 27, 32, 33, 35, 37, 52, 53, 55, 57, 72, 73, 75, 77, 222, 223, 225, 227, 232, 233, 235, 237, 252, 253, 255, 257, 272, 273, 275, 277, 322, 323, 325, 327, 332, 333, 335, 337, 352, 353, 355, 357, 372, 373, 375, 377, 522, 523, 525, 527, 532

In the range up to 40,000, there are 852 such numbers, constituting 2.13% of the total. Clearly not all these numbers are prime. In fact only 124 are. These primes that contain only prime digits are as follows:

2, 3, 5, 7, 23, 37, 53, 73, 223, 227, 233, 257, 277, 337, 353, 373, 523, 557, 577, 727, 733, 757, 773, 2237, 2273, 2333, 2357, 2377, 2557, 2753, 2777, 3253, 3257, 3323, 3373, 3527, 3533, 3557, 3727, 3733, 5227, 5233, 5237, 5273, 5323, 5333, 5527, 5557, 5573, 5737, 7237, 7253, 7333, 7523, 7537, 7573, 7577, 7723, 7727, 7753, 7757, 22273, 22277, 22573, 22727, 22777, 23227, 23327, 23333, 23357, 23537, 23557, 23753, 23773, 25237, 25253, 25357, 25373, 25523, 25537, 25577, 25733, 27253, 27277, 27337, 27527, 27733, 27737, 27773, 32233, 32237, 32257, 32323, 32327, 32353, 32377, 32533, 32537, 32573, 33223, 33353, 33377, 33533, 33577, 33757, 33773, 35227, 35257, 35323, 35327, 35353, 35527, 35533, 35537, 35573, 35753, 37223, 37253, 37273, 37277, 37337, 37357, 37537, 37573

These numbers constitute OEIS A019546. Numbers in this sequence ending in the digit 2 will always be followed by the next number ending in 3. Permalink. Figure 1 is a plot of the previous numbers.


Figure 1

Getting back to OEIS A046034, there will be concentrations of such numbers and now that my diurnal age has reached the 272 hundreds I'm entering such a cluster. The first number was 27222 followed by 27223 and now 27232, 27233 etc. The first prime is 27253.

Monday, 16 October 2023

Keith Numbers

A Keith Number is an \(n\)-digit integer N with the following property: If a Fibonacci-like sequence (in which each term in the sequence is the sum of the \(n\) previous terms) is formed, with the first \(n\) terms being the decimal digits of the number N, then N itself occurs as a term in the sequence. For example, 197 is a Keith number since it generates the sequence (source)

1, 9, 7, 17, 33, 57, 107, 197, ...

The Keith numbers form OEIS A007629 and the initial members are as follows:

14, 19, 28, 47, 61, 75, 197, 742, 1104, 1537, 2208, 2580, 3684, 4788, 7385, 7647, 7909, 31331, 34285, 34348, 55604, 62662, 86935, 93993, 120284, 129106, 147640, 156146, 174680, 183186, 298320, 355419, 694280, 925993, 1084051, 7913837, 11436171, 33445755, 44121607

Let's take 31331 as another example (permalink):

3, 1, 3, 3, 1, 11, 19, 37, 71, 139, 277, 543, 1067, 2097, 4123, 8107, 15937, 31331

I encountered a variation of Keith numbers when I celebrated being 27223 days old. One of the properties of this number is that it's a member of OEIS A274770:


 A274770

Cube analog to Keith numbers.                                      


Here are the OEIS comments regarding this sequence:

Like Keith numbers but starting from \(n^3\) digits to reach \(n\). Consider the digits of the cube of a number \(n\) . Take their sum and repeat the process deleting the first addend and adding the previous sum. The sequence lists the numbers that after some iterations reach a sum equal to themselves.

The example of \( 776^3 = 467288576 \) is given:

4 + 6 + 7 + 2 + 8 + 8 + 5 + 7 + 6 = 53

6 + 7 + 2 + 8 + 8 + 5 + 7 + 6 + 53 = 102

7 + 2 + 8 + 8 + 5 + 7 + 6 + 53 + 102 = 198

2 + 8 + 8 + 5 + 7 + 6 + 53 + 102 + 198 = 389

8 + 8 + 5 + 7 + 6 + 53 + 102 + 198 + 389 = 776

The initial members of the sequence are:

1, 8, 17, 18, 26, 27, 44, 55, 63, 80, 105, 187, 326, 776, 1095, 2196, 6338, 13031, 13131, 25562, 27223, 70825, 140791, 553076, 632489, 1402680, 1404312, 3183253, 11311424, 50783292, 51231313, 182252596, 255246098, 522599548, 1180697763, 2025114819, 2137581414

In a similar vein, we have the square analogs of Keith numbers. These numbers comprise OEIS A274769


 A274769

Square analog to Keith numbers.         
                                       


The OEIS comments state that:
Like Keith numbers but starting from \(n^2\) digits to reach \(n\). Consider the digits of the square of a number \(n\). Take their sum and repeat the process deleting the first addend and adding the previous sum. The sequence lists the numbers that after some iterations reach a sum equal to themselves.

 The example of \( 1264^2 = 1597696 \) is given :

1 + 5 + 9 + 7 + 6 + 9 + 6 = 43

5 + 9 + 7 + 6 + 9 + 6 + 43 = 85

9 + 7 + 6 + 9 + 6 + 43 + 85 = 165

7 + 6 + 9 + 6 + 43 + 85 + 165 = 321

6 + 9 + 6 + 43 + 85 + 165 + 321 = 635

9 + 6 + 43 + 85 + 165 + 321 + 635 = 1264

The initial members of this sequence are:

1, 9, 37, 40, 43, 62, 70, 74, 160, 1264, 1952, 2847, 12799, 16368, 16584, 42696, 83793, 97415, 182011, 352401, 889871, 925356, 1868971, 1881643, 3661621, 7645852, 15033350, 21655382, 63288912, 88192007, 158924174, 381693521, 792090500, 2025078249, 2539401141

Finally, let's return to Keith numbers and include some further comments from Mr Keith himself (source):

There are still a number of unanswered questions about these numbers, such as:

Are there an infinite number of Keith numbers? Heuristic arguments, and the numerical evidence above, both strongly suggest that the answer is "yes" - in fact, we expect to find roughly \(0.9 \log_2{10}\) (about 3) of them between each power of 10. But there is still no proof, constructive or otherwise, that there are an infinite number of them.

Define a cluster of Keith numbers as a set of two or more (all with the same number of digits) in which all the numbers are integer multiples of the smallest one in the set. There are only three known clusters: (14, 28), (1104, 2208), and the remarkable - for having three members - (31331, 62662, 93993). Question: is the number of Keith clusters finite or infinite? Not only do we conjecture it is finite, but we conjecture that the above three clusters are the only ones.  But we have no clue how to prove this.

Is \(n=10\) the only number of digits for which there are no Keith numbers?  (We tentatively think not, but it may be a while before another one is found.)

Collatz-2 Trajectory

Collatz Trajectory:

The Collatz trajectory of a number \(n\) is defined as follows:$$ \begin{align} n &\rightarrow \frac{n}{2} \text{ if } n \text{ is even}\\n &\rightarrow 3n+1 \text{ if n is odd} \end{align}$$The Collatz conjecture is that the trajectory of all numbers eventually ends in 1 and this has not yet been proven. Most numbers reach 1 quickly but some numbers require far more steps e.g.  6,171 requires 261 steps. 

P+ 1 Trajectory:

The Collatz trajectory is sometimes referred to as the 3\(n\)+1 trajectory and generalisation of this is the P\(n\)+1 trajectory of which the Collatz trajectory is the special case of P=\(3\). Let's consider the case of P=17 where 17\(n\)+1 is defined as:$$ \begin{align} n &\rightarrow \frac{n}{2^{a} . 3^{b} . 5^{c} . 7^{d}  . 11^{e}  . 13^{f}} \\ \\ \text{ where } a,b,c,d,e,f &\geq 0 \text{ and } 2^{a} \text{ is a factor of } n \text{ if } a>0 \text{ etc. }\\ \text{and not all }a,b,c,d,e &=0 \text{ because denominator is then 1}\\ \text{if all } a,b,c,d,e &=0 \text{ then denominator is 1 and }\\ \\ n &\rightarrow 17n+1 \end{align} $$Here is the trajectory of 61 under these rules:

61, 1038, 173, 2942, 1471, 25008, 521, 8858, 4429, 75294, 4183, 71112, 2963, 50372, 257, 4370, 437, 7430, 743, 12632, 1579, 26844, 2237, 38030, 3803, 64652, 2309, 39254, 19627, 333660, 5561, 94538, 47269, 803574, 14881, 252978, 3833, 65162, 32581, 553878, 263, 4472, 43, 732, 61

As can be seen, the trajectory loops back to the starting point. Figure 1 shows its graph with a peak of 803574 being reached:


Figure 1: permalink

While some numbers have a looping trajectory, the majority terminate in 1. Another prime, 41, is an example of this with Figure 2 graphing the trajectory.

41, 698, 349, 5934, 989, 16814, 1201, 20418, 3403, 57852, 1607, 27320, 683, 11612, 2903, 49352, 6169, 104874, 227, 3860, 193, 3282, 547, 9300, 31, 528, 1, 18, 1


Figure 2

PrimeLatz Trajectory:

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.

The trajectory of 61 is 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, 9, 50, 25, 122, 61 with Figure 3 showing the graph where a maximum of 272 is reached:


Figure 3

Esucarys Trajectory

The Esucarys sequence derives its name from a reversal of "Syracuse", with the generating rule being that for the Syracuse (3\(n\)+1 or Collatz) sequence followed by a reversal. 247 is the only known fixed point of the Esucarys sequence. Very few numbers map to 247. The members of this sequence, up to 40,000, are:

247, 1247, 1484, 2473, 4859, 5087, 5738, 7318, 7484, 9563, 9682, 9694, 9938, 11247, 12189, 12473, 14840, 14842, 15209, 15610, 16274, 16563, 16750, 16798, 17609, 19168, 20019, 21885, 24733, 26251, 27123, 27125, 29156, 30076, 30524, 32614

Figure 4 shows the trajectory of 26251:


Figure 4

All other numbers simply increase without bound. So much for the review of what I've covered in earlier posts. Now it's time for the Collatz-2 trajectory.

Collatz-2 Trajectory

This trajectory is defined by a generalization of the classical '3\(n\)+1' function: instead of dividing an even number by 2 a non-prime will be divided by its smallest prime factor and a prime will be multiplied not by 3 but by its prime-predecessor, before one is added. Thus:$$ \begin{align} \text{for } n \text{ composite: } n &\rightarrow \frac{n}{\text{smallest prime factor}}\\ \text{for } n \text{ prime: }n &\rightarrow n \times \text{ previous prime} \end{align}$$Most numbers will have a trajectory that ends in 2 while others will enter a loop and yet still others will return to their starting points (and thus loop as well). 29 is an example of a number that returns to its starting point. It's trajectory is 29, 668, 334, 167, 27222, 13611, 4537, 349, 121104, 60552, 30276, 15138, 7569, 2523, 841, 29 (permalink). Figure 5 shows its trajectory:


Figure 5: 
permalink

Thursday, 12 October 2023

Primitive Sets

The ErdÅ‘s primitive set conjecture is that the following summation:$$ \sum _{n \, \in A} \frac {1}{n\log{n}}$$where A is any primitive set (a set where no member of the set divides another member) attains its maximum at the set of primes numbers. It was proved by Jared Duker Lichtman (pictured above) in 2022. I was informed of this via a YouTube video first released in 2022. Here is a link to the academic paper by Lichtman. The constant turns out to be about 1.6366 ... and summations of the form shown above can be no larger than this. Thus we have:$$ \sum _{p \, \in P} \frac {1}{p\log{p}} \approx 1.6366$$where P is the set of primes and \(p\) is any prime number.

Let's take the summation of the elements of the set S of semiprimes. These elements form a primitive set. Let's suppose each semiprime can be represented by its prime factors \(p\) and \(q\) where \(p \leq q\). We then have:$$ \sum _{pq \, \in S} \frac {1}{pq\log {pq}} \approx 1.1448 \dots$$We can continue this process and consider the primitive set containing all numbers with three not necessarily distinct prime factors and so on. In each case, the sum converges to a constant which can be designated as \(f_k\) where \(k\) represents the number of prime factors. Thus we've seen that \(f_1 \approx 1.6366\) and \(f_2 \approx 1.1448\). In general we write:$$f_k=\sum  \frac {1}{n\log{n}}\\ \text{where } n \text{ has } k \text{ prime factors}$$The long term behaviour of \(f_k\) is shown in Figure 1 where the term "fingerprint numbers" is used to identify these types of numbers:


Figure 1: screenshot from video

While the values of \(f_k\) initially decrease and drop below 1 for \(f_3\), it can be seen that the values bottom out around \(f_5\) and \(f_6\) and then increase slowly as they approach a value of 1 asymptotically from below. This behaviour can be seen more clearly in Figure 2.


Figure 2: screenshot from video

The term "fingerprint numbers" is an informal term used in the referenced videos and is not used formally in mathematical circles. There are many different types of primitive sets but they all have the property that no member of the set divides another member.

Friday, 6 October 2023

A Simple BMI Problem

For some reason I thought of this simple algebraic problem while going to sleep last night. Here it is:

A fully grown adult person has a body mass index of 20.2. After gaining 3 kilograms in weight, the same person now has a body mass index of 21.2. How tall is the person to the nearest centimetre?

Let's say the person's initial weight is \(W\) and height is \(h\). This gives us two equations:$$ \begin{align} \frac{W}{h^2} &= 20.2\\ \\ \frac{W+3}{h^2}&=21.2 \end{align} $$ The first equation yields:$$W=20.2 \,h^2$$ and substituting this into the second yields:$$\begin{align} 20.2 \, h^2+3 &= 21.2 \, h^2\\h^2 &= 3\\h &= \pm \sqrt{3}\\ &\approx \pm 1.73 \end{align} $$Thus the person is 1.73 metres tall to the nearest centimetre. I obviously chose easy numbers to work with but the calculation is straightforward for any numbers.

Clearly the problem is of lower secondary high school level of difficulty but for some reason it popped into my head, an echo of my long ago days as a high school teacher of Mathematics. The key to the problem is realising that the height of the person doesn't change because we are dealing with an adult and not a child or adolescent. Units for weight are kilograms and, for height, metres. The problem could be made more difficult by using pounds and inches, forcing conversion between the metric and non-metric systems of measurement.

The issue of accuracy in this problem should be addressed because it must be noted that the BMI is accurate to only one decimal place and yet the height is being reported to two decimal places. BMI is commonly expressed to one decimal place so it's reasonable to suppose that a rounding to the nearest one decimal place has occurred. This means that the first BMI (let's call it BMI_1) and the second BMI (let's call it BMI_2) lie within the following bounds: $$20.15 \leq \text{ BMI}_1 <20.25\\21.15 \leq \text{BMI}_2 <21.25$$Considering the minimum and maximum of these ranges, we get a maximum and minimum difference as follows:$$ \begin{align} \text{minimum}&=21.15-20.25\\ &=0.90\\ \text{maximum} &=21.25-20.15\\ &=1.10 \end{align}$$Going back to our original equation and designating the minimum and maximum heights as \(h_{ \text{min}} \) and  \(h_{ \text{max}} \) respectively, we see that:$$\begin{align} 1.1 \, h_{\text{min}}^2 &= 3 \\ h_{ \text{min}} &=  \pm \sqrt{3 \div 1.1}\\ & \approx \pm 1.65 \\0.9 \, h_{\text{max}}^2 &= 3 \\ h_{ \text{max}} &=\pm \sqrt{3 \div 0.9}\\ & \approx \pm 1.83 \end{align}$$Thus the height could have ranged between 1.65 metres and 1.83 metres if we record the BMI to the nearest one decimal place. The assumption here is that the weight is 3.00 kilograms which is unlikely of course but I didn't want to complicate matters.

Having realised this, let's rephrase the problem using BMI's accurate to two decimal places as well as a weight accurate to two decimal places as well:

A fully grown adult person has a body mass index of 20.23. After gaining 3.11 kilograms in weight, the same person now has a body mass index of 21.19. How tall is the person to the nearest centimetre?

Using these figures, we see that:$$ \begin{align} 0.96 \, h^2 &=3.11\\ h&= \pm \sqrt{3.11 \div 0.96}\\& \approx \pm 1.80 \end{align}$$Thus we have a height of 1.80 metres to the nearest two decimal places. The moral of this problem is that it's meaningless to have one quantity accurate to one decimal place (BMI) and another accurate to the nearest whole number (weight) and to then ask for a quantity that is dependent on these first two quantities to be expressed with an accuracy of two decimal places. This is simply false accuracy and it can creep into calculations unless we are vigilant, which I wasn't when I originally framed the problem. The more we multiply and divide approximations, the more the margin of error grows.

This post marks my 100th of the year and equals my record for 2022. My record of 105 posts is from 2021, a record I seem likely to break given that three months of the year remain.

Tuesday, 3 October 2023

Pointer Primes and Beyond

I need to acknowledge that the number associated with my diurnal age today, 27211, is the last pointer prime that I will encounter in my current lifetime, the next being 61211. So what is a pointer prime?

The product of the digits of the prime number 23 is 2 x 3 = 6. Note that 23 + 6 = 29, the next prime number. The prime 23 can be said to "point" to the next prime number 29 in the sense that when 23 is added to the product of its digits, 29 is obtained. We define the prime number \(p\) to be a pointer prime if the next prime after \(p\) can be obtained from \(p\) by adding to \(p\) the product of the digits of \(p\). Source.

The pointer primes up to one million are as follows(permalink):

23, 61, 1123, 1231, 1321, 2111, 2131, 11261, 11621, 12113, 13121, 15121, 19121, 21911, 22511, 27211, 61211, 116113, 131231, 312161, 611113

The conjecture is that 23 is the only pointer prime that does not contain a 1 and this seems likely to be the case. In the case of my diurnal age number we have 27211 + 28 = 27239.

It's easy enough to extend the idea of pointer primes to pointer semiprimes. In this case we can say that:

We define the semiprime number \(n\) to be a pointer semiprime if the next semiprime after \(n\) can be obtained from \(n\) by adding to \(n\) the product of the digits of \(n\).

In the range up to one million, the only such pointer semiprimes are 22, 123, 1411, 11521, and 111161 as shown below (permalink with the algorithm only considering semiprimes with distinct prime factors):

22 = 2 * 11 --> 26 = 2 * 13

123 = 3 * 41  --> 129 = 3 * 43

1411 = 17 * 83  --> 1415 = 5 * 283

11521 = 41 * 281  --> 11531 = 13 * 887

111161 = 89 * 1249  --> 111167 = 7 * 15881

It can be seen that all except 22 contain the digit 1 as was the case with 23 and the other pointer primes.

So let's go on to pointer sphenics in which case we can say that:

We define the sphenic number \(n\) to be a pointer sphenic if the next sphenic after \(n\) can be obtained from \(n\) by adding to \(n\) the product of the digits of \(n\).

In the range up to one million, the only such pointer sphenics are 222, 21122, 31114, 111122, 111711, 125111 and 912111 as shown below (permalink):

222 = 2 * 3 * 37 --> 230 = 2 * 5 * 23

21122 = 2 * 59 * 179 --> 21130 = 2 * 5 * 2113

31114 = 2 * 47 * 331 --> 31126 = 2 * 79 * 197

111122 = 2 * 11 * 5051 --> 111126 = 2 * 3 * 18521

111711 = 3 * 23 * 1619 --> 111718 = 2 * 83 * 673

125111 = 7 * 61 * 293 --> 125121 = 3 * 179 * 233

912111 = 3 * 23 * 13219 --> 912129 = 3 * 47 * 6469

Once again it is only 222 that does not contain the digit 1 while all others do. Of course, we could change the definition of a pointer prime so that the prime needs only to point to any higher prime not just the next higher prime. We need to exclude primes containing zero in this definition because the product of digits is then zero and adding zero to the original prime leaves us with the original prime! By this definition, the pointer primes would be far more frequent. For example, there would be 899 of them in the range up to 40000 (permalink).