Showing posts with label derivative. Show all posts
Showing posts with label derivative. Show all posts

Sunday, 26 November 2023

Arithmetic Derivative Records

On June 19th 2019 I made a post titled Arithmetic Derivative and in this post I'll return to the topic. I was prompted to do so by one of the properties of the number associated with my diurnal age today. The number is 27265 and it has the property that its arithmetic derivative, 11448, has no digits in common with the number itself. I've listed these numbers in an entry in my Bespoken for Sequences.

I'm not going to pursue that topic in this post but I was reminded of arithmetic derivatives and got to thinking about records being set by the size of arithmetic derivatives as the natural numbers are traversed. It didn't take long to develop a SageMath algorithm to explore this topic (permalink). Detailed results are shown below in Table 1 with derivatives up 40000 in size, although the algorithm lists the records for numbers up to one million.


Table 1

The record setting sizes of the arithmetic derivatives form OEIS A131116 and the initial values are as follows:

4, 5, 12, 16, 32, 44, 80, 112, 192, 272, 448, 640, 1024, 1472, 2304, 2368, 3328, 3392, 5120, 5376, 7424, 7744, 11264, 12032, 16384, 16640, 17408, 24576, 26624, 35840, 36864, 38656, 53248, 58368, 77824, 80896, 84992, 114688, 126976, 167936, 176128, 185344, 245760, 274432, 360448, 380928, 401408, 524288, 528384, 589824, 593920, 770048, 774144, 819200, 864256, 1114112, 1130496, 1261568, 1277952, 1638400, 1658880, 1753088, 1851392, 2359296, 2408448, 2686976, 2736128, 3473408, 3538944, 3735552, 3948544, 4980736, 5111808, 5701632, 5832704, 7340032, 7520256, 7929856, 8388608

Table 2 shows a graph of these numbers:


Table 2

As can be seen from Table 1, all the numbers associated with these records contain all powers of 2 together with multiples of these powers. The initial numbers are:

4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 640, 768, 960, 1024, 1280, 1536, 1920, 2048, 2560, 3072, 3584, 3840, 4096, 5120, 6144, 7168, 7680, 8192, 10240, 12288, 14336, 15360, 16384, 20480, 24576, 28672, 30720, 32768, 40960, 49152, 57344, 61440, 65536, 73728, 81920, 90112, 98304, 110592, 114688, 122880, 131072, 147456, 163840, 180224, 196608, 221184, 229376, 245760, 262144, 294912, 327680, 360448, 393216, 442368, 458752, 491520, 524288, 589824, 655360, 720896, 786432, 884736, 917504, 983040

Wednesday, 14 December 2022

Two Equations, Two Unknowns and the Beta Function

I spotted this little problem on Twitter (see Figure 1):


Figure 1

The proximity of \(+31\) to \(+32\) should alert us to the possibility that either \(x=+2\) or \(y=+2\) is a solution. After that, the corresponding \(x\) and \(y\) values fall into place. However, let's suppose that we didn't spot this and I have to confess I didn't. In that case, we follow the conventional method. 

At first sight, it looks like you will end up with a quintic equation after substituting \(y=1-x\) into \(x^5+y^5=31\) and there is no general formula for solving quintic equations. However, the \(x^5\) terms cancels out nicely leaving us with a quartic equation. Let's see how:$$\begin{align} x^5+(1-x)^5&=31\\x^5+(1-5x+10x^2-10x^3+5x^4-x^5)&=31\\5x^4-10x^3+10x^2-5x-30&=0\\5x^3(x-2)+5(2x^2-x-6)&=0\\5x^3(x-2)+5(2x+3)(x-2)&=0\\(x-2)(5x^3+10x+15)&=0\\5(x-2)(x^3+2x+3)&=0\\5(x-2)(x+1)(x^2-x+3)&=0 \end{align}$$Thus \(x=2\) and \(y=-1\) or \(x=-1\) and \(y=2\). Using GeoGebra, this can be confirmed visually as shown in Figure 2:


Figure 2

Differentiation reveals a little more about the graph of \(x^5+y^5=31\):$$\begin{align} y'&=\frac{-x^4}{y^4}\\&=-\frac{x^4}{\sqrt[5]{31-x^5}} \end{align} $$It can be seen that \(y'\) is undefined when \(x=\sqrt[5]{31} \approx 1.9873 \) and thus the graph is vertical at this point. If we zoom in a little, this becomes clearer (see Figure 3). There is a point of horizontal inflection when \(x=0\).


Figure 3

This was a useful little exercise as I got to revisit the binomial expansion for \( (a+b)^5\) and the factor theorem in order to factorise \(x^3+2x+3\). Using 1 rather than 31, I was also prompted to consider the area under the curve for \( x^5+y^5 =1\) between 0 and 1. See Figure 4.


Figure 4

In this graph, the vertical tangent occurs at \(x=1\) and this got me thinking about the area under the curve between 0 and 1. In other words, what is the value of:$$ \int_0^1 \sqrt[5]{1-x^5} \, dx$$Using SageMathCell, the integral evaluates to:$$ 0.2 \cdot \beta \! \left (0.2, 1.2 \right )$$Now I vaguely remember coming across a so-called \( \beta \) function that is in some way, I think, related to the \(\Gamma \) function. Further investigation revealed that they are indeed related. In fact:$$ 0.2 \cdot \beta(0.2, 1.2)= 0.2 \cdot \frac{ \Gamma(0.2) \cdot \Gamma(1.2)}{ \Gamma(0.2 +1.2)} \approx 0.950150138988437 $$This result looks about right but what is going on with this \( \beta \) function? Well, the beta function is actually an integral between 0 and 1 involving two different values, let's say \(a\) and \(b\), so that we have:$$\beta(a,b)=\int_0^1 t^{a-1} \cdot (1-t)^{b-1} dt$$If we can get our integral into that form then we can integrate it. Firstly, we make a substitution. Let \(t=x^5\) and so \(dt/dx=5x^4\) and \(dx=0.2 x^{-4}\). We can write \(x^{-4}=t^{-0.8}\) and the integral now transforms into:$$ \begin{array} \displaystyle \displaystyle \int_0^1 \sqrt[5]{1-x^5} \, dx &=\text{0}.2 \displaystyle \int_0^1 t^{-0.8} (1-t)^{0.2} \, dt \\&=0.2 \displaystyle \int_0^1 t^{0.2-1} (1-t)^{1.2-1} \, dt\\&=0.2 \, \beta(0.2,1.2) \end{array} $$So this was quite an interesting post that led me in some unexpected directions. I also was interested in the area between the curves \(x^2+y^2=1\) and \(x^5+y^5=1\) in the range from 0 to 1. See Figure 5 where eq2 is \(x^2+y^2=1\) and the curve \(x^5+y^5=1\) is a tangent to the circle at \(x=0\) and \(x=1\).


Figure 5

Clearly, the area between the two curves from \(x=0 \text{ to }1\) is given by \( \beta(0.2,1.2) - \dfrac{\pi}{4} \). What I've learned from all this is that the \(\beta\) function is a very useful tool to have in one's integration armoury.

Wednesday, 12 June 2019

Arithmetic Derivative

With Mathematics, there's always something new under the Sun and today it happened to be the concept of the arithmetic derivative that I can't recall ever hearing of before.

Today I turned 25637 days old and this number is a member of OEIS A189639: numbers n such that n'' = n'+1 where n' and n'' are respectively the first and the second arithmetic derivative of n. The members of this sequence, up to and including 25637, are:

161, 209, 221, 1935, 4265, 15941, 22217, 24041, 25637

Not knowing anything about such derivatives, I set out to learn more about them. Here is a quote from Wikipedia (quotation in blue):

For natural numbers the arithmetic derivative is defined as follows:

* \(p' \;=\; 1 \) for any prime \(p \).
* \((pq)'\;=\;p'q\,+\,p q' \) for any \(p \textrm{,}\, q \;\in\; \mathbb{N}\).

E. J. Barbeau was most likely the first person to formalize this definition. He also extended it to all integers by proving that \((-x)' \;=\; -(x')\) uniquely defines the derivative over the integers. 

Barbeau also further extended it to rational numbers, showing that the familiar quotient rule gives a well-defined derivative on Q: $$\left(\frac{p}{q}\right)' = \frac{p'q-p q'}{q^2} \ .$$Victor Ufnarovski and Bo Ã…hlander expanded it to certain irrationals. In these extensions, the formula above still applies, but the exponents \(e_i \) are allowed to be arbitrary rational numbers.

Elementary properties

The Leibniz rule implies that \(0'=0 \) (take \(p = q = 0 \)) and \(1'=0 \) (take \(p = q = 1 \)). The ''power rule'' is also valid for the arithmetic derivative. For any integers \(p \) and \(n'' >= 0\): $$(p^n)' = np^{n-1} p'.$$This allows one to compute the derivative from the prime factorisation of an integer, \(x = p_1^{n_1}\cdots p_k^{n_k}\): $$x' = \sum_{i=1}^k n_i p_1^{n_1} \cdots p_{i-1}^{n_{i-1}} p_i^{n_i-1} p_{i+1}^{n_{i+1}}\cdots p_k^{n_k} = \sum_{i=1}^k \frac {n_i} {p_i}x.$$ For example: $$60' = (2^2 \cdot 3 \cdot 5)' = \left(\frac{2}{2} + \frac{1}{3} + \frac{1}{5}\right) \cdot 60 = 92$$ $$81' = (3^4)' = 4\cdot 3^3\cdot 3' = 4\cdot 27\cdot 1 = 108.$$The sequence of number derivatives for \(k = 0, 1, 2, ... \) begins OEIS A003415:$$0, 0, 1, 1, 4, 1, 5, 1, 12, 6, 7, 1, 16, 1, 9, \ldots$$It is only numbers of the form \(p^p\) where \(p\) is prime that have arithmetic derivatives equal to themselves \(4 = 2^2, 27 = 3^3, 3125 = 5^5, 823543 = 7^7 \) etc.

I came across an interesting paper published about the properties of these derivatives. Here is the abstract:
The notion of the arithmetic derivative, a function sending each prime to 1 and satisfying the Leibnitz rule, is extended to the case of complex numbers with rational real and imaginary parts. Some constraints on the solutions to some arithmetic differential equations are found. The homogeneous arithmetic differential equation of the k-th order is studied. The factorization structure of the antiderivatives of natural numbers is presented. Arithmetic partial derivatives are defined and some arithmetic partial differential equations are solved.
The paper is too heavy for me to digest but it certainly shows that arithmetic derivatives (sometimes called Lagarias arithmetic derivatives or number derivatives), are serious mathematical functions and to quote from the conclusion of the Wikipedia article:
Victor Ufnarovski and Bo Ã…hlander have detailed the function's connection to famous number-theoretic conjectures like the twin prime conjecture, the prime triples conjecture, and Goldbach's conjecture. For example, Goldbach's conjecture would imply, for each k > 1 the existence of an n so that n' = 2k. The twin prime conjecture would imply that there are infinitely many k for which k'' = 1.
In the article mentioned, the arithmetic derivatives is extended to rational, real and complex numbers. Getting back to basics however, I should add that the product rule for derivatives can be used to find a value for the arithmetic derivative of 1:

1' = (1.1)' = 1'.1+1.1' = 2*1' and the only way the equation holds is if 1'=0.

Here is a YouTube video that introduces the arithmetic derivative:



I owe to the presenter of the video the following line of enquiry. In some cases, repeated "differentiation" leads to 1 and thus 0. 25637 is an example of this where 25637 --> 858 --> 859 --> 1 because 859 is prime. However, for other numbers, the results increase at a rapid rate. Take 88 as a case in point. Here:

140 --> 188 --> 192 --> 640 --> 2368 --> 7168 --> 36864 --> 245760 --> 1851392 --> 12976128 --> 120127488 etc.

Whether there is, eventually, a derivative that is a prime number and will bring the sequence to an end, I don't know. It would be an interesting idea to explore. Here is what the repeated differentiation of the natural numbers from 2 to 100 produces. I stopped after ten steps and marked these numbers in bold.

2 1 0
3 1 0
4 4 4 4 4 4 4 4 4 4 4
5 1 0
6 5 1 0
7 1 0
8 12 16 32 80 176 368 752 1520 3424 8592
9 6 5 1 0
10 7 1 0
11 1 0
12 16 32 80 176 368 752 1520 3424 8592 20096
13 1 0
14 9 6 5 1 0
15 8 12 16 32 80 176 368 752 1520 3424
16 32 80 176 368 752 1520 3424 8592 20096 70464
17 1 0
18 21 10 7 1 0
19 1 0
20 24 44 48 112 240 608 1552 3120 8144 16304
21 10 7 1 0
22 13 1 0
23 1 0
24 44 48 112 240 608 1552 3120 8144 16304 32624
25 10 7 1 0
26 15 8 12 16 32 80 176 368 752 1520
27 27 27 27 27 27 27 27 27 27 27
28 32 80 176 368 752 1520 3424 8592 20096 70464
29 1 0
30 31 1 0
31 1 0
32 80 176 368 752 1520 3424 8592 20096 70464 235072
33 14 9 6 5 1 0
34 19 1 0
35 12 16 32 80 176 368 752 1520 3424 8592
36 60 92 96 272 560 1312 3312 8976 22288 47872
37 1 0
38 21 10 7 1 0
39 16 32 80 176 368 752 1520 3424 8592 20096
40 68 72 156 220 284 288 912 2176 7744 24640
41 1 0
42 41 1 0
43 1 0
44 48 112 240 608 1552 3120 8144 16304 32624 65264
45 39 16 32 80 176 368 752 1520 3424 8592
46 25 10 7 1 0
47 1 0
48 112 240 608 1552 3120 8144 16304 32624 65264 130544
49 14 9 6 5 1 0
50 45 39 16 32 80 176 368 752 1520 3424
51 20 24 44 48 112 240 608 1552 3120 8144
52 56 92 96 272 560 1312 3312 8976 22288 47872
53 1 0
54 81 108 216 540 1188 2484 5076 10260 23112 57996
55 16 32 80 176 368 752 1520 3424 8592 20096
56 92 96 272 560 1312 3312 8976 22288 47872 198656
57 22 13 1 0
58 31 1 0
59 1 0
60 92 96 272 560 1312 3312 8976 22288 47872 198656
61 1 0
62 33 14 9 6 5 1 0
63 51 20 24 44 48 112 240 608 1552 3120
64 192 640 2368 7168 36864 245760 1851392 12976128 120127488 1012858880
65 18 21 10 7 1 0
66 61 1 0
67 1 0
68 72 156 220 284 288 912 2176 7744 24640 84608
69 26 15 8 12 16 32 80 176 368 752
70 59 1 0
71 1 0
72 156 220 284 288 912 2176 7744 24640 84608 296256
73 1 0
74 39 16 32 80 176 368 752 1520 3424 8592
75 55 16 32 80 176 368 752 1520 3424 8592
76 80 176 368 752 1520 3424 8592 20096 70464 235072
77 18 21 10 7 1 0
78 71 1 0
79 1 0
80 176 368 752 1520 3424 8592 20096 70464 235072 705280
81 108 216 540 1188 2484 5076 10260 23112 57996 135648
82 43 1 0
83 1 0
84 124 128 448 1408 5056 15232 56384 169216 677120 2902784
85 22 13 1 0
86 45 39 16 32 80 176 368 752 1520 3424
87 32 80 176 368 752 1520 3424 8592 20096 70464
88 140 188 192 640 2368 7168 36864 245760 1851392 12976128
89 1 0
90 123 44 48 112 240 608 1552 3120 8144 16304
91 20 24 44 48 112 240 608 1552 3120 8144
92 96 272 560 1312 3312 8976 22288 47872 198656 1094656
93 34 19 1 0
94 49 14 9 6 5 1 0
95 24 44 48 112 240 608 1552 3120 8144 16304
96 272 560 1312 3312 8976 22288 47872 198656 1094656 5474304
97 1 0
98 77 18 21 10 7 1 0
99 75 55 16 32 80 176 368 752 1520 3424

100 140 188 192 640 2368 7168 36864 245760 1851392 12976128

Notice that 74 and 75 both produce the same sequence of derivatives after the first derivative. It can be seen that these two numbers, and many others, join the sequence 8 12 16 32 80 176 368 752 1520 ... However, there are other sequences as well such as 20, 24 44 48 112 240 608 1552 3120 8144 16304 ... Lots of food for thought here.

On a final note, mention should be made of Giuga numbers that are conjectured to be solutions of the equation n' = n + 1. They are rather rare. In fact, the numbers 30, 858, 1722 and 66198 are the only such numbers below one million.