# Finally On Natural Analogarithms

Over the course of the year my fellow students and I have spent much of our spare time investigating the properties of the set of infinite dimensional vectors associated with the roots of rational numbers by way of the former's elements being the powers to which the latter's prime factors are raised, which we have dubbed $$\boldsymbol\ell$$-space.
We proceeded to define functions of such numbers by applying operations of linear algebra to their $$\boldsymbol\ell$$-space vectors; firstly with their magnitudes and secondly with their inner products. This time, I shall report upon our explorations of the last operation that we have taken into consideration; the products of matrices and vectors.

Recall that, for a root of a rational $$x$$ which we may represent as
$x = \prod_{p \in P} p^{k_p}$
where $$\prod$$ is the product sign, $$\in$$ means within, $$P$$ is the set of all primes and each $$k_p$$ is a rational number, we defined its logarithm with respect to a prime $$p$$ as
$\mathrm{lf}_p(x) = k_p$
By introducing a set of units $$\ell_p$$ to denote the primes that their coefficients are logarithms with respect to, we went on to define the logarithm of $$x$$ with respect to all primes as
$\mathrm{lp}(x) = \sum_{p \in P} \mathrm{lf}_p(x) \ell_p$
where $$\sum$$ is the summation sign. Note that by associating each of these units with the natural logarithm of its prime we have
$e^{\ell_p} = e^{\ln(p)} = p$
and consequently
$e^{\mathrm{lp}(x)} = e^{\sum_{p \in P} \mathrm{lf}_p(x) \ell_p} = \prod_{p \in P} e^{\mathrm{lf}_p(x) \ell_p} = \prod_{p \in P} \left(e^{\ell_p}\right)^{\mathrm{lf}_p(x)} = \prod_{p \in P} p^{\mathrm{lf}_p(x)} = \prod_{p \in P} p^{k_p} = x$
Finally, if we construct a vector from those units
$\boldsymbol{\ell} = \begin{pmatrix} \ell_2\\ \ell_3\\ \ell_5\\ \vdots \end{pmatrix}$
then we may define the $$\boldsymbol\ell$$-space vector associated with $$x$$ as
$\mathbf{x} = \begin{pmatrix} \mathrm{lf}_2(x)\\ \mathrm{lf}_3(x)\\ \mathrm{lf}_5(x)\\ \vdots \end{pmatrix}$
so that
$\mathbf{x} \times \boldsymbol\ell = \begin{pmatrix} \mathrm{lf}_2(x)\\ \mathrm{lf}_3(x)\\ \mathrm{lf}_5(x)\\ \vdots \end{pmatrix} \times\begin{pmatrix} \ell_2\\ \ell_3\\ \ell_5\\ \vdots \end{pmatrix} = \sum_{p \in P} \mathrm{lf}_p \ell_p = \mathrm{lp}(x)$
and we consequently chose to denote the transformation to $$\boldsymbol\ell$$-space with
$\mathbf{x} = \tfrac{\mathrm{lp}}{\boldsymbol\ell}(x)$
Note that we implemented our logarithm with the lp function, given in listing 1, which takes for its first argument x the rational of which a positive integer root has been taken and for its second r the root that has been taken of it, with a default of the first, or no, root, returning an array of objects each having a property p indicating which unit $$\ell_p$$ its rational coefficient k is associated with, using our ak.rational type to represent the latter.

Listing 1: The Rational Root Logarithm
function lp(x, r) {
var i = 0;
var l = [];
var n, d, p, k;

if(ak.type(x)!==ak.RATIONAL_T) {
throw new Error('invalid argument in lp');
}
n = x.num();
d = x.den();
if(n<=0 || !isFinite(n)) throw new Error('invalid argument in lp');

if(ak.nativeType(r)===ak.UNDEFINED_T) {
r = 1;
}
else if(r!==ak.floor(r) || r<1 || !isFinite(r)) {
throw new Error('invalid root in lp');
}

while(n>1 || d>1) {
p = ak.primeSequence(i++);
k = 0;
if(n>1) while(n%p===0) {++k; n /= p;}
if(d>1) while(d%p===0) {--k; d /= p;}
if(k!==0) l.push({p: p, k: ak.rational(k, r)});
}
return l;
}


### An $$\boldsymbol\ell$$-Space Matrix Transformation

A trivial way to manipulate vectors is to multiply them by matrices and we may therefore define new functions of roots of rationals by multiplying their associated $$\boldsymbol\ell$$-space vectors by infinite dimensional rational matrices and then transforming the results back into roots of rationals with
$f_\mathbf{M}(x) = e^{\left(\mathbf{M} \times \frac{\mathrm{lp}}{\boldsymbol\ell}(x)\right) \times \boldsymbol\ell}$
A simple example is the matrix that has a first row filled with ones and remaining rows filled with zeros
$\mathbf{H}_2 = \begin{pmatrix} 1 & 1 & 1 &\dots\\ 0 & 0 & 0 &\dots\\ 0 & 0 & 0 &\dots\\ \vdots & \vdots & \vdots &\ddots \end{pmatrix}$
so that
$\mathbf{H}_2 \times \tfrac{\mathrm{lp}}{\boldsymbol\ell}(x) = \begin{pmatrix} \mathrm{lf}_2(x) + \mathrm{lf}_3(x) + \mathrm{lf}_5(x) + \dots\\ 0\\ 0\\ \vdots \end{pmatrix}$
and
$f_{\mathbf{H}_2}(x) = 2^{\sum_{p \in P} \mathrm{lf}_p(x)} = \prod_{p \in P} 2^{k_p}$
replacing every prime factor of $$x$$ with two. Deck 1 plots the values of $$f_{\mathbf{H}_2}$$ for rational numbers between zero and one, with demoninators progressing from one to one hundred and twenty eight, adopting the convention that it equals zero at zero.

Deck 1: fH2 From Zero To One Whilst the scales of these graphs vary considerably, as illustrated by the red line at one, they exhibit a certain self-similarity in their relative heights for different arguments of $$f_{\mathbf{H}_2}$$. This is highlighted by deck 2 which plots the results for denominators that are increasing powers of two.

Deck 2: fH2 For Power Of Two Denominators For the sake of convenience whilst exploring the nature of that self-similarity we elected to represent this graph with the function
$\mathfrak{F}_n(k) = f_{\mathbf{H}_2}\left(\tfrac{k}{2^n}\right)$
for integer $$k$$ between zero and $$2^n$$.

Since two is the smallest prime number it must trivially be the case that $$2^n$$ is the smallest integer having $$n$$ prime factors and consequently
\begin{align*} \sum_{p \in P} \mathrm{lf}_p(k) &\leqslant n\\ \sum_{p \in P} \mathrm{lf}_p(k) &- n \leqslant 0 \end{align*}
for all such $$k$$. From the definition of $$\mathfrak{F}$$
$\mathfrak{F}_n(k) = 2^{\sum_{p \in P} \mathrm{lf}_p\left(\frac{k}{2^n}\right)} = 2^{\sum_{p \in P} \mathrm{lf}_p(k) - n}$
we consequently have
$0 \leqslant \mathfrak{F}_n(k) \leqslant 1$
with the lower bound holding solely for $$k$$ equal to zero and the upper bound solely for $$k$$ equal to $$2^n$$.
Furthermore, the self-similarities that we have observed in the graphs of $$f_{\mathbf{H}_2}$$ are made plain with the formulae
$\mathfrak{F}_{n+1}(2k) = f_{\mathbf{H}_2}\left(\tfrac{2k}{2^{n+1}}\right) = f_{\mathbf{H}_2}\left(\tfrac{k}{2^n}\right) = \mathfrak{F}_{n}(k)$
and
$\mathfrak{F}_{n}(2k) = f_{\mathbf{H}_2}\left(\tfrac{2k}{2^n}\right) = f_{\mathbf{H}_2}\left(\tfrac{k}{2^{n-1}}\right) = 2^{\sum_{p \in P} \mathrm{lf}_p(k) - (n-1)} = 2 \times 2^{\sum_{p \in P} \mathrm{lf}_p(k) - n} = 2 \times f_{\mathbf{H}_2}\left(\tfrac{k}{2^n}\right) = 2 \times \mathfrak{F}_{n}(k)$

### Fractal Dimension

Both self-similarity and ever increasing detail when observed at ever finer scales are properties that are commonly associated with those curious graphs known as fractals; so named because, in some sense, they occupy a fractional number of dimensions.
A simple example is the Koch curve, which is constructed by repeatedly adding triangular kinks to every straight line in its graph. Specifically, each is split into three equal segments, the middle of which is removed and replaced with two lines that meet at a point perpendicular to its midpoint, as demonstrated by deck 3.

Deck 3: The Koch Curve We may capture the sense in which such graphs have fractional dimensions by approximating their lengths with rulers of various sizes. The closest approximations are made by placing the rulers so that their ends lie upon points on the graph that are as close together as possible, beginning at the start of the graph and proceeding from the point upon which the end of the ruler had previously rested.
For example, we might measure the length of a quarter segment of the unit circle, having a radius of one, with rulers that are coincident with the edges of polygons, as demonstrated by deck 4.

Deck 4: Measuring A Quarter Circle If we lay exactly $$n$$ rulers of equal length upon this graph then the angle between the start and end of each at the centre of the circle is plainly $$\frac{\pi}{2n}$$.
Figure 1: A Simple Matter Of Trigonometry We can figure the length of those rulers with a little trigonometry by drawing lines between each end to the circle's centre to construct a triangle and then splitting it horizontally to create two equally sized and shaped right-angled triangles, reflection notwithstanding, as illustrated by figure 1. The length of those triangles' sides opposite their angles on the left hand side, or in other words at the centre of the circle, are simply the magnitudes of the sines of those angles multiplied by the lengths of their hypotenuses, which in this case equal one.
The length of those rulers is consequently
$2 \times \sin\left(\tfrac{\pi}{2n} \div 2\right) = 2 \times \sin\left(\tfrac{\pi}{4n}\right)$
and the approximate length of the quarter circle that we might measure with them would therefore be
$2n \times \sin\left(\tfrac{\pi}{4n}\right)$
Substituting the the sine with its Taylor series yields
\begin{align*} 2n \times \sum_{i=0}^\infty \frac{\left(-1\right)^i}{\left(2i+1\right)!} \left(\frac{\pi}{4n}\right)^{2i+1} &=2n \times \left(\frac{\pi}{4n} - \frac16\left(\frac{\pi}{4n}\right)^3 + \frac{1}{120}\left(\frac{\pi}{4n}\right)^5 - \dots\right)\\ &=\frac{\pi}{2} - \frac{\pi^3}{192n^2} + \frac{\pi^5}{61,440n^4} - \dots \end{align*}
where the exclamation mark stands for the factorial, which clearly converges upon a quarter of the circumference of the unit circle as $$n$$ tends to infinity.
Deck 5 measures the Koch curve with rulers of length $$\left(\frac13\right)^n$$

Deck 5: Measuring The Koch Curve of which it takes $$4^n$$ to span the curve and so we should measure its length as $$\left(\frac43\right)^n$$, which trivially tends to infinity as $$n$$ does.
We can define the fractal dimension of a curve in terms of the number of rulers of length $$l$$ that are required to measure it, which we shall denote as $$n_l$$, with
$\lim_{l \to 0} \frac{\ln n_l}{\ln \frac{1}{l}}$
where $$\lim$$ stands for the limit of the term upon its right as the variable to the left of the arrow beneath it tends to the value to its right.
Now it should clearly take $$n$$ rules of length $$\frac{L}{n}$$ to measure a straight line of length $$L$$ and it would consequently have a fractal dimension of
$\lim_{n \to \infty} \frac{\ln n}{\ln \dfrac{1}{\frac{L}{n}}} = \lim_{n \to \infty} \frac{\ln n}{\ln \frac{n}{L}} = \lim_{n \to \infty} \frac{\ln n}{\ln n - \ln L} = \lim_{n \to \infty} \frac{1}{1 - \dfrac{\ln L}{\ln n}} = 1$
which is reassuringly consistent with the usual geometric definition.
By noting that the Taylor series for the sine implies that
$\lim_{\theta \to 0} \; \sin \theta = \theta$
we may similarly deduce that the fractal dimension of the quarter circle is also equal to one.
$\lim_{n \to \infty} \frac{\ln n}{\ln \dfrac{1}{2 \times \sin\left(\tfrac{\pi}{4n}\right)}} = \lim_{n \to \infty} \frac{\ln n}{\ln \dfrac{1}{\frac{\pi}{2n}}} = \lim_{n \to \infty} \frac{\ln n}{\ln \frac{2n}{\pi}} = \lim_{n \to \infty} \frac{\ln n}{\ln n + \ln \frac{2}{\pi}} = \lim_{n \to \infty} \frac{1}{1 + \dfrac{\ln \frac{2}{\pi}}{\ln n}} = 1$
In contrast, the Koch curve has a fractal dimension of
$\lim_{n \to \infty} \frac{\ln 4^n}{\ln \dfrac{1}{\left(\tfrac13\right)^n}} = \lim_{n \to \infty} \frac{\ln 4^n}{\ln 3^n} = \lim_{n \to \infty} \frac{n \times \ln 4}{n \times \ln 3} = \frac{\ln 4}{\ln 3} \approx 1.261860$
where $$\approx$$ means approximately equal to.

### Measuring $$f_{\mathbf{H}_2}$$

Since the graph of $$f_{\mathbf{H}_2}$$ is discrete we may define its length from zero to one at a scale of $$\left(\frac12\right)^{n}$$ by summing the heights of its bars at those points having denominators of $$2^n$$
$\sum_{k=0}^{2^n} f_{\mathbf{H}_2}\left(\tfrac{k}{2^n}\right) = \sum_{k=0}^{2^n} \mathfrak{F}_n(k)$
and its fractal dimension should consequently be
$\lim_{n \to \infty} \frac{\ln \dfrac{\sum_{k=0}^{2^n} \mathfrak{F}_n(k)}{\left(\frac12\right)^{n}}}{\ln \dfrac{1}{\left(\frac12\right)^{n}}} = \lim_{n \to \infty} \frac{\ln \sum_{k=0}^{2^n} \mathfrak{F}_n(k) + n \times \ln 2}{n \times \ln 2} = \lim_{n \to \infty} \frac{\ln \sum_{k=0}^{2^n} \mathfrak{F}_n(k)}{n \times \ln 2} + 1$
My fellow students and I have derived an upper bound for this dimension by noting that
\begin{align*} \sum_{k=0}^{2^n} \mathfrak{F}_n(k) &= \mathfrak{F}_n(0) + \mathfrak{F}_n(1) + \mathfrak{F}_n(2) + \mathfrak{F}_n(3) + \mathfrak{F}_n(4) + \mathfrak{F}_n(5) + \mathfrak{F}_n(6) + \mathfrak{F}_n(7) + \mathfrak{F}_n(8) + \dots\\ &< \mathfrak{F}_n(0) + \mathfrak{F}_n(1) + \mathfrak{F}_n(2) + \mathfrak{F}_n(2) + \mathfrak{F}_n(4) + \mathfrak{F}_n(4) + \mathfrak{F}_n(4) + \mathfrak{F}_n(4) + \mathfrak{F}_n(8) + \dots\\ &= \mathfrak{F}_n(0) + \left(\sum_{i=0}^{n-1} 2^i \times \mathfrak{F}_n(2^i)\right) + \mathfrak{F}_n(2^n)\\ &= 0 + \left(\sum_{i=0}^{n-1} 2^i \times \frac{2^i}{2^n}\right) + 1 = 1 + \sum_{i=0}^{n-1} \frac{4^i}{2^n} \end{align*}
in which the sum is a geometric series and so
$\sum_{k=0}^{2^n} \mathfrak{F}_n(k) < 1 + \frac{1}{2^n} \times \frac{1-4^n}{1-4} = 1 + \frac{4^n - 1}{3 \times 2^n} < 1+\frac{4^n}{3 \times 2^n} = 1+\frac{2^n}{3}$
implying an upper bound of
$\lim_{n \to \infty} \frac{\ln \left(1+\frac{2^n}{3}\right)}{n \times \ln 2} + 1 = \lim_{n \to \infty} \frac{\ln \frac{2^n}{3}}{n \times \ln 2} + 1 = \lim_{n \to \infty} \frac{n \times \ln 2 - \ln 3}{n \times \ln 2} + 1 = 2$
Now I must admit that this isn't particularly enlightening given that the union of a countably infinite number of lines in no way constitutes an area and so cannot be two dimensional.

Fortunately we have done much better by employing the tools of the theory of wager. Specifically, if we denote the number of prime factors of an integer $$k$$ with $$\Omega(k)$$, we have
$\lim_{n \to \infty} \Pr\left(\Omega(k) \leqslant \ln \ln n + c \times \sqrt{\ln \ln n}\right) = \Phi(c)$
for $$k$$ chosen at random from between one and $$n$$, where $$\Phi$$ is the cumulative distribution function of the standard normal distribution. Rearranging yields
$\lim_{n \to \infty} \Pr\left(\frac{\Omega(k) - \ln \ln n}{\sqrt{\ln \ln n}} \leqslant c\right) = \Phi(c)$
implying that $$\Omega(k)$$ is governed, in the limit, by a normal distribution with a mean and standard deviation of
\begin{align*} \mu_n &= \ln \ln n\\ \sigma_n &= \sqrt{\ln \ln n} \end{align*}
It must therefore be the case that the limit of $$2^{\Omega(k)}$$ is governed by
$\lim_{n \to \infty} 2^{\Omega(k)} = \lim_{n \to \infty} \left(e^{\ln 2}\right)^{\Omega(k)} = \lim_{n \to \infty} e^{\Omega(k) \times \ln 2} \sim LN(\mu_n \times \ln 2, \sigma_n \times \ln 2)$
where $$LN(\mu,\sigma)$$ is the log normal distribution with a log mean of $$\mu$$ and a log standard derivation of $$\sigma$$ and $$\sim$$ means drawn from. By the basic properties of the log normal distribution we can figure its average value to be
\begin{align*} \lim_{n \to \infty} \mathrm{E}\left[2^{\Omega(k)}\right] &= e^{\mu_n \times \ln 2 + \frac12 \left(\sigma_n \times \ln 2\right)^2} = e^{\left(\ln \ln n\right) \times \ln 2 + \frac12 \left(\ln \ln n\right) \times \left(\ln 2\right)^2}\\ &= \left(e^{\ln \ln n}\right)^{\ln 2 + \frac12 \left(\ln 2\right)^2} = \left(\ln n\right)^{\ln 2 + \frac12 \left(\ln 2\right)^2} \end{align*}
where $$\mathrm{E}$$ stands for the expected value of the term between the square brackets, and consequently
$\lim_{n \to \infty} \sum_{k=1}^n 2^{\Omega(k)} = \lim_{n \to \infty} n \times \mathrm{E}\left[2^{\Omega(k)}\right] = n \times \left(\ln n\right)^{\ln 2 + \frac12 \left(\ln 2\right)^2}$
Now, since
$\sum_{p \in P} \mathrm{lf}_p(k) = \Omega(k)$
we have
$\mathfrak{F}_n(k) = \frac{2^{\Omega(k)}}{2^n}$
and so
\begin{align*} \lim_{n \to \infty} \sum_{k=0}^{2^n} \mathfrak{F}_n(k) &= 0 + \lim_{n \to \infty} \sum_{k=1}^{2^n} \mathfrak{F}_n(k) = \lim_{n \to \infty} \frac{\sum_{k=1}^{2^n} 2^{\Omega(k)}}{2^n}\\ &= \frac{2^n \times \left(\ln 2^n\right)^{\ln 2 + \frac12 \left(\ln 2\right)^2}}{2^n} = \left(n \times \ln 2\right)^{\ln 2 + \frac12 \left(\ln 2\right)^2} \end{align*}
Taking the logarithm yields
\begin{align*} \lim_{n \to \infty} \ln \sum_{k=0}^{2^n} \mathfrak{F}_n(k) &= \ln \left(\left(n \times \ln 2\right)^{\ln 2 + \frac12 \left(\ln 2\right)^2}\right) = \left(\ln 2 + \frac12 \left(\ln 2\right)^2\right) \times \ln \left(n \times \ln 2\right)\\ &= \left(\ln 2 + \frac12 \left(\ln 2\right)^2\right) \times \left(\ln n + \ln \ln 2\right) < \ln n \end{align*}
since
\begin{align*} \ln 2 + \frac12 \left(\ln 2\right)^2 &< 1\\ \ln \ln 2 &< 0 \end{align*}
Finally, noting that
$\lim_{n \to \infty} \frac{\ln n}{n} = 0$
the fractal dimension of $$f_{\mathbf{H}_2}$$ must equal
$\lim_{n \to \infty} \frac{\ln \sum_{k=1}^{2^n} \mathfrak{F}_n(k)}{n \times \ln 2} + 1 = 0+1 = 1$
and therefore, quite contrary to our expectations, it is not a fractal.
$$\Box$$

### References

 On Natural Analogarithms, www.thusspakeak.com, 2018.

 Further On Natural Analogarithms, www.thusspakeak.com, 2018.

 Further Still On Natural Analogarithms, www.thusspakeak.com, 2018.

 Knuth, D., The Art of Computer Programming, Volume 2: Seminumerical Algorithms (Third Edition), Page 384, Addison-Wesley, 1997.

Loosely based upon an article I wrote for ACCU's Overload magazine.

### Gallimaufry  AKCalc
ECMA  Endarkenment
Turning Sixteen

• Subscribe
• Contact
• Downloads
• GitHub

This site requires HTML5, CSS 2.1 and JavaScript 5 and has been tested with Chrome 26+ Firefox 20+ Internet Explorer 9+