# Further On Natural Analogarithms

My fellow students and I have of late been thinking upon an equivalence between the roots of rational numbers and an infinite dimensional rational vector space, which we have named $$\boldsymbol{\ell}$$-space, that we discovered whilst defining analogues of logarithms that were expressed purely in terms of rationals[1].
We were particularly intrigued by the possibility of defining functions of such numbers by applying linear algebra operations to their associated vectors, which we began with a brief consideration of that given by their magnitudes. We have subsequently spent some time further exploring its properties and it is upon our findings that I shall now report.

You will recall that we defined the rational logarithm of a root of a rational $$x$$ with respect to a prime $$p$$, which we denoted with $$\mathrm{lf}_p$$, as the power to which that prime is raised in its unique factorisation so that
$x = \prod_{p \in P} p^{\mathrm{lf}_p(x)}$
where $$\prod$$ is the product sign, $$\in$$ means within and $$P$$ is the set of prime numbers.
We then proceeded to define a set of units $$\ell_p$$ to identify which prime a logarithm was taken with respect to, much as we use $$i$$ to identify the imaginary part of a complex number, so that we could define a rational logarithm of such numbers with respect to all primes with
$\mathrm{lp}(x) = \sum_{p \in P} \mathrm{lf}_p(x) \ell_p$
where $$\sum$$ is the summation sign, which we put together a deck of cards to calculate for an ak.rational argument x with an optional argument r indicating which root we wish to take of it, as given in listing 1.

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;
}


By associating each $$\ell_p$$ with the natural logarithm of $$p$$, we were able to invert this logarithm with the exponential function
$e^{\mathrm{lp}(x)} = e^{\sum_{p \in P} \mathrm{lf}_p(x) \ell_p} = \prod_{p \in P} e^{\mathrm{lf}_p(x) \ln(p)} = \prod_{p \in P} p^{\mathrm{lf}_p(x)} = x$
Finally, we defined an infinite dimensional vector $$\boldsymbol{\ell}$$ having those units as its elements
$\boldsymbol{\ell} = \begin{pmatrix} \ell_2\\ \ell_3\\ \ell_5\\ \vdots \end{pmatrix}$
so that we could uniquely associate every root of a rational number $$x$$ with a rational vector $$\mathbf{x}$$ such that
$\mathrm{lp}(x) = \mathbf{x} \times \boldsymbol{\ell}$
which we expressed as
$\mathbf{x} = \tfrac{\mathrm{lp}}{\boldsymbol{\ell}}(x)$
The magnitude of $$x$$ in $$\boldsymbol{\ell}$$-space is consequently
$|x|_\boldsymbol{\ell} = \left|\tfrac{\mathrm{lp}}{\boldsymbol{\ell}}(x)\right| = \sqrt{\sum_{p \in P} \mathrm{lf}_p(x)^2}$
as demonstrated for rationals with a denominator of twelve by deck 1.

Deck 1: ℓ-Space Magnitudes Of Rationals

By elementary rules of scalar and vector arithmetic, it was trivial to deduce that this magnitude must satisfy
\begin{align*} \left|\frac{1}{x}\right|_\boldsymbol{\ell} &= \left|x\right|_\boldsymbol{\ell}\\ \left|x \times y\right|_\boldsymbol{\ell} &\leqslant \left|x\right|_\boldsymbol{\ell} + \left|y\right|_\boldsymbol{\ell} \end{align*}
but the property that has particularly drawn my fellow students' and my attention is the fact that it is itself a root of a rational number.

### Magnitudes Of Magnitudes

We were naturally quite curious as to what might result from repeatedly taking the $$\boldsymbol{\ell}$$-space magnitudes of $$\boldsymbol{\ell}$$-space magnitudes of numbers.

Now it is trivially the case that for any prime number $$p$$ we have
$\left|\frac{1}{p}\right|_\boldsymbol{\ell} = \left|p\right|_\boldsymbol{\ell} = \left|p^1\right|_\boldsymbol{\ell} = \sqrt{1^2} = 1$
and thereafter
$\left|1\right|_\boldsymbol{\ell} = 0$
at which point we chose to desist since our logarithm doesn't have a unique representation for zero.
Furthermore, for any positive integer $$x$$ we have
$x = \prod_{p \in P} p^{\mathrm{lf}_p(x)} \geqslant \prod_{p \in P} 2^{\mathrm{lf}_p(x)} = 2^{\sum_{p \in P} \mathrm{lf}_p(x)} > \sum_{p \in P} \mathrm{lf}_p(x)$
since $$\mathrm{lf}_p(x)$$ must be no less than zero for all primes $$p$$, which also implies that
\begin{align*} \left(\sum_{p \in P} \mathrm{lf}_p(x)\right)^2 &\geqslant \sum_{p \in P} \mathrm{lf}_p(x)^2\\ \sum_{p \in P} \mathrm{lf}_p(x) &\geqslant \sqrt{\sum_{p \in P} \mathrm{lf}_p(x)^2} \end{align*}
and consequently
$x > \left|x\right|_\boldsymbol{\ell}$
We had, therefore, rather suspected that every positive integer might decay to zero under the repeated application of the $$\boldsymbol{\ell}$$-space magnitude, but much to our surprise found that this is not the case. For example
\begin{align*} \left|144\right|_\boldsymbol{\ell} &= \left|2^4 \times 3^2\right|_\boldsymbol{\ell} = \sqrt{4^2 + 2^2} = \sqrt{16+4} = \sqrt{20} = 2\sqrt{5}\\ \left|2\sqrt{5}\right|_\boldsymbol{\ell} &= \left|2^1 \times 5^\frac12\right|_\boldsymbol{\ell} = \sqrt{1^2 + \left(\tfrac{1}{2}\right)^2} = \sqrt{1 + \tfrac{1}{4}} = \sqrt{\tfrac{5}{4}} = \tfrac12 \sqrt{5}\\ \left|\tfrac12 \sqrt{5}\right|_\boldsymbol{\ell} &= \left|2^{-1} \times 5^\frac12\right|_\boldsymbol{\ell} = \sqrt{(-1)^2 + \left(\tfrac{1}{2}\right)^2} = \sqrt{1 + \tfrac{1}{4}} = \sqrt{\tfrac{5}{4}} = \tfrac12 \sqrt{5} \end{align*}
We have, however, determined that such calculations must terminate in either this value or zero. We did so by first noting that any non-zero terminating value must take the form
$\left|\tfrac12 \sqrt{x}\right|_\boldsymbol{\ell}$
for some integer $$x$$, since we have already reckoned that such values cannot be integers and the $$\boldsymbol{\ell}$$-space magnitude of a square root must involve terms with factors of one half.
Now, if $$x$$ is odd then
$3^n \leqslant x < 3^{n+1} \to |x|_\boldsymbol{\ell} \leqslant n$
where $$\to$$ means implies, since $$3^n$$ is the smallest positive odd integer with $$n$$ prime factors and, as we have already noted, the square of the sum of the logarithms $$\mathrm{lf}_p(x)$$ is greater than or equal to the sum of their squares.
Since $$x$$ has no factors of two, we can rearrange the magnitude of our supposed terminating values to
$\left|\tfrac12 \sqrt{x}\right|_\boldsymbol{\ell}^2 = \left|2^{-1} \times x^\tfrac12\right|_\boldsymbol{\ell}^2 = 1 + \tfrac14 \left|x\right|_\boldsymbol{\ell}^2$
from which we may deduce that
$\left|\tfrac12 \sqrt{x}\right|_\boldsymbol{\ell} = \tfrac12 \sqrt{x} \to 1 + \tfrac14 \left|x\right|_\boldsymbol{\ell}^2 = \tfrac14 x \to 4 + \left|x\right|_\boldsymbol{\ell}^2 = x$
By the constraints that we have placed upon $$x$$, its number of prime factors $$n$$ and its magnitude we must have
\begin{align*} 3^n &\leqslant x < 3^{n+1}\\ 3^n &\leqslant 4+n^2 \end{align*}
and it may therefore only equal one, three, five or seven and, of these, only five satisfies the equality
$4 + \left|x\right|_\boldsymbol{\ell}^2 = x$
When it comes to even numbers we need only consider those that have a single factor of two, for otherwise we should cancel out the half that comes before the square root. Applying the same reasoning yields
\begin{align*} \left|\tfrac12 \sqrt{2x}\right|_\boldsymbol{\ell}^2 &= \left|2^{-\tfrac12} \times x^\tfrac12\right|_\boldsymbol{\ell}^2 = \tfrac14 + \tfrac14 \left|x\right|_\boldsymbol{\ell}^2\\ \left|\tfrac12 \sqrt{2x}\right|_\boldsymbol{\ell} &= \tfrac12 \sqrt{2x} \to \tfrac14 + \tfrac14 \left|x\right|_\boldsymbol{\ell}^2 = \tfrac12 x \to 1 + \left|x\right|_\boldsymbol{\ell}^2 = 2x \end{align*}
for odd $$x$$, and consequently its number of prime factors must be constrained by
\begin{align*} 3^n &\leqslant x < 3^{n+1}\\ 2 \times 3^n &\leqslant 1+n^2 \end{align*}

Note that this result must also hold for rational numbers since
$\left|\prod_{p \in P} p^{\mathrm{lf}_p(x)}\right|_\boldsymbol{\ell} = \left|\prod_{p \in P} p^{|\mathrm{lf}_p(x)|}\right|_\boldsymbol{\ell}$
where $$|\mathrm{lf}_p(x)|$$ is the regular magnitude of $$\mathrm{lf}_p(x)$$, so that every rational has the same $$\boldsymbol{\ell}$$-space magnitude as some integer.

Finally, since the highest root that might appear in the result of this magnitude is the square root, we may assert that every number for which it is defined must converge upon either zero or $$\tfrac12\sqrt{5}$$ when subjected to its repeated application.

### Generalised ℓ-Space Magnitudes

A common generalisation of the magnitude of a vector $$\mathbf{x}$$ involves raising the absolute values of its elements to a power other than two and then taking the equivalent root of their sum, which we may write as
$\left|\mathbf{x}\right|_n = \left(\sum_i \left|x_i\right|^n\right)^\tfrac{1}{n}$
We may similarly generalise our $$\boldsymbol{\ell}$$-space magnitude to powers other than two with
$|x|_{\boldsymbol{\ell}n} = \left|\tfrac{\mathrm{lp}}{\boldsymbol{\ell}}(x)\right|_n = \left(\sum_{p \in P} \left|\mathrm{lf}_p(x)\right|^n\right)^\tfrac{1}{n}$
For $$n$$ equal to one it is trivially the case that roots of rationals must have rational magnitudes, that rationals must have integer magnitudes and that integers must have integer magnitudes that are smaller and, consequently, the iterated magnitude of every such number must terminate with zero.
For $$n$$ equal to five, however, my fellow students and I discovered a quite different result. For example
\begin{align*} \left|\tfrac15 \times 1026^\tfrac15\right|_{\boldsymbol{\ell}5} &= \left|\tfrac15 \times 2^\frac15 \times 3^\frac35 \times 19^\frac15\right|_{\boldsymbol{\ell}5} = \left(\left|-1\right|^5 + \left|\tfrac15\right|^5 + \left|\tfrac35\right|^5 + \left|\tfrac15\right|^5\right)^\tfrac15\\ &= \left(1 + \tfrac{1}{3125} + \tfrac{243}{3125} + \tfrac{1}{3125}\right)^\tfrac15 = \left(\tfrac{3370}{3125}\right)^\tfrac15 = \left(\tfrac{674}{625}\right)^\tfrac15\\ \left|\left(\tfrac{674}{625}\right)^\tfrac15\right|_{\boldsymbol{\ell}5} &= \left|2^\tfrac15 \times 5^{-\tfrac45} \times 337^\tfrac15\right|_{\boldsymbol{\ell}5} = \left(\left|\tfrac15\right|^5 + \left|-\tfrac45\right|^5 + \left|\tfrac15\right|^5\right)^\tfrac15\\ &= \left(\tfrac{1}{3125} + \tfrac{1024}{3125} + \tfrac{1}{3125}\right)^\tfrac15 = \left(\tfrac{1026}{3125}\right)^\tfrac15 = \tfrac15 \times 1026^\tfrac15 \end{align*}
Unfortunately our mathematical prowess was not sufficient to enable us to figure whether or not this is the only such orbit and so we assembled a deck of cards to search for them, as demonstrated by deck 2 which shows how we discovered it.

Deck 2: Discovering Our First Orbit

Here we are not explicitly taking the fifth roots in the iterated magnitudes but are instead passing its order into the function f that computes the magnitude, which, in its turn, passes it to the function lp that computes the logarithm, so that the value of x is the rational number of which we should take the fifth root to yield the magnitude.
Note that if you initially set x to $$\frac{6}{3125}$$ you will see that it also has a fixed non-zero terminating value of
$\left|\tfrac15 \times 3127^\tfrac15\right|_{\boldsymbol{\ell}5} = \tfrac15 \times 3127^\tfrac15$
Deck 3 uses this same logic to systematically search for orbits and non-zero terminating values, writing out the last two values of any sequence of magnitudes that does not conclude with zero so as to distinguish between them.

Deck 3: A Systematic Search

Whilst this certainly doesn't rule out any further non-zero conclusions to the iterated $$\boldsymbol{\ell}5$$ magnitude, it's certainly suggestive that the two that we have found are far and away the most common.
For the repeated $$\boldsymbol{\ell}4$$ magnitude, we find two non-zero terminating values
\begin{align*} \left|\tfrac14 \times 4113^\tfrac14\right|_{\boldsymbol{\ell}6} &= \tfrac14 \times 4113^\tfrac14\\ \left|\tfrac12 \times \left(\tfrac{1201}{8}\right)^\tfrac14\right|_{\boldsymbol{\ell}6} &= \tfrac12 \times \left(\tfrac{1201}{8}\right)^\tfrac14 \end{align*}
hinting that there may be some relationship between the kinds and numbers of the conclusions of these sequences of magnitudes and the factorisations of their orders.
However, if we search for such end states of the repeated $$\boldsymbol{\ell}3$$ magnitude we find none, whereas for the $$\boldsymbol{\ell}6$$ magnitude we find three
\begin{align*} \left|2^\tfrac16\right|_{\boldsymbol{\ell}6} &= \tfrac12 \times 729^\tfrac16 &\left|\tfrac12 \times 729^\tfrac16\right|_{\boldsymbol{\ell}6} &= 2^\tfrac16\\ \left|\left(\tfrac{7813}{11664}\right)^\tfrac16\right|_{\boldsymbol{\ell}6} &= \left(\tfrac{8459}{7776}\right)^\tfrac16 &\left|\left(\tfrac{8459}{7776}\right)^\tfrac16\right|_{\boldsymbol{\ell}6} &= \left(\tfrac{7813}{11664}\right)^\tfrac16\\ \left|\tfrac12 \times 243^\tfrac16\right|_{\boldsymbol{\ell}6} &= \tfrac12 \times 243^\tfrac16 \end{align*}
which rather confounds that supposition.

Much to our consternation, my fellow students and I have been unable to discern any clear patterns in the repeated $$\boldsymbol\ell$$-space magnitudes of up to the seventh order using this deck and, unfortunately, the limitations of our ak.rational arithmetic prevent us from using it to investigate those of higher orders.

### Forcing The Issue

We have, however, discovered that we can engender more interesting orbits with a modicum of forcing. Specifically, the sequence
\begin{align*} x_0 &= c\\ x_i &= c \times \left|x_{i-1}\right|_\boldsymbol{\ell} \end{align*}
results in lengthy orbits for many positive composite forcing integers $$c$$, being those that are the products of more than one prime number. Note that it is trivially the case that for any prime $$p$$
$p \times \left|p\right|_\boldsymbol{\ell} = p$
since the $$\boldsymbol\ell$$-space magnitude of any prime must equal one.
For example, choosing $$c$$ equal to nine yields
$\begin{array}{llllll} x_0 &= 9\\ x_1 &= 9 \times \left|9\right|_\boldsymbol{\ell} &= 9 \times \left|3^2\right|_\boldsymbol{\ell} &= 9 \times \sqrt{4} &= 18\\ x_2 &= 9 \times \left|18\right|_\boldsymbol{\ell} &= 9 \times \left|2 \times 3^2\right|_\boldsymbol{\ell} &= 9 \times \sqrt{1+4} &= 9 \times \sqrt{5}\\ x_3 &= 9 \times \left|9 \times \sqrt{5}\right|_\boldsymbol{\ell} &= 9 \times \left|3^2 \times 5^\tfrac12\right|_\boldsymbol{\ell} &= 9 \times \sqrt{4+\tfrac14} &= 9 \times \sqrt{\tfrac{17}{4}} &= \tfrac92 \times \sqrt{17}\\ x_4 &= 9 \times \left|\tfrac92 \times \sqrt{17}\right|_\boldsymbol{\ell} &= 9 \times \left|2^{-1} \times 3^2 \times 17^\tfrac12\right|_\boldsymbol{\ell} &= 9 \times \sqrt{1+4+\tfrac14} &= 9 \times \sqrt{\tfrac{21}{4}} &= \tfrac92 \times \sqrt{21}\\ x_5 &= 9 \times \left|\tfrac92 \times \sqrt{21}\right|_\boldsymbol{\ell} &= 9 \times \left|2^{-1} \times 3^\tfrac52 \times 7^\tfrac12\right|_\boldsymbol{\ell} &= 9 \times \sqrt{1+\tfrac{25}{4}+\tfrac14} &= 9 \times \sqrt{\tfrac{30}{4}} &= \tfrac92 \times \sqrt{30}\\ x_6 &= 9 \times \left|\tfrac92 \times \sqrt{30}\right|_\boldsymbol{\ell} &= 9 \times \left|2^{-\tfrac12} \times 3^\tfrac52 \times 5^\tfrac12\right|_\boldsymbol{\ell} &= 9 \times \sqrt{\tfrac14+\tfrac{25}{4}+\tfrac14} &= 9 \times \sqrt{\tfrac{27}{4}} &= \tfrac{27}{2} \times \sqrt{3}\\ x_7 &= 9 \times \left|\tfrac{27}{2} \times \sqrt{3}\right|_\boldsymbol{\ell} &= 9 \times \left|2^{-1} \times 3^\tfrac72\right|_\boldsymbol{\ell} &= 9 \times \sqrt{1+\tfrac{49}{4}} &= 9 \times \sqrt{\tfrac{53}{4}} &= \tfrac92 \times \sqrt{53}\\ x_8 &= 9 \times \left|\tfrac92 \times \sqrt{53}\right|_\boldsymbol{\ell} &= 9 \times \left|2^{-1} \times 3^2 \times 53^\tfrac12\right|_\boldsymbol{\ell} &= 9 \times \sqrt{1+4+\tfrac14} &= 9 \times \sqrt{\tfrac{21}{4}} &= \tfrac92 \times \sqrt{21} \end{array}$
having a four step orbit from $$x_4$$ to $$x_8$$.

It was but a simple matter of programming to adapt our deck 2 to search for these forced orbits, as demonstrated by deck 4.

Deck 4: A Forced Orbit

As you may see for yourself, different compound integer values of $$c$$ yield orbits of various lengths. For example, the sequence for twenty four ends in an orbit of three steps, that for fifteen in one of two and that for four having just one.

To envision the lengths of the orbits for various integer forcing constants we put together deck 5, which plots the one against the other.

Deck 5: Many Forced Orbits

This seems to exhibit a general trend of lengthier orbits first occurring for larger forcing integers and having greater gaps between subsequent examples of them.
To investigate this, we constructed a deck to search for forcing integers that yield orbits of any particular length, given by deck 6.

Deck 6: Forced Orbits Of A Given Length

We then used it to figure, for each orbit from one to twelve steps, the first ten such integers and thereafter the average distance from the one to the next, treating one as the origin on account of it never yielding an orbit.
Plotting these averages reveals an approximately exponential relationship between the lengths of orbits and the average distances between their consecutive forcing constants, as illustrated by figure 1.

Figure 1: The Average Distances Between Orbits

This is highlighted by taking the logarithms of the average distances to yield an approximately linear relationship, as shown by figure 2 in which the dashed line represents the straight line that most closely fits the points upon its graph.

Figure 2: The Logarithms Of The Average Distances Between Orbits

That straight line has a gradient that is remarkably close to one, to within one part in one thousand in fact, which strongly suggests that there may be some profound relationship between the lengths of orbits and the distances between the forcing constants that yield them, although we have sadly failed to figure what that relationship might be.

### Bounding The Sequence

We have, however, determined that the values produced by such repeated applications of the forced magnitude must be bounded from above. Specifically, that for every rational forcing constant $$c$$ there exists a value $$x^\ast_c$$ for which
$x \geqslant x^\ast_c \to c \times |x|_\boldsymbol\ell \leqslant x$
Now if we express $$c$$ as $$\frac{a}{b}$$ then we may represent the result of a few iterations of the forced magnitude with
$x = \frac{a \sqrt{y}}{2b}$
since the square root may introduce a factor of one half into the results. If $$a$$, $$b$$ and $$y$$ have $$k_a$$, $$k_b$$ and $$k_y$$ prime factors respectively then, by the triangle inequality, which implies that
$\sum_i k_i^2 \leqslant \left(\sum_i k_i\right)^2$
for non-negative $$k_i$$, and by the fact that we are not taking into account the possibility that the numerator may have some prime factors in common with the denominator, it must be the case that
$|x|_\boldsymbol\ell \leqslant \tfrac12 k_y + k_a + k_b + 1$
and so if
$\frac{a}{b}\left(\tfrac12 k_y + k_a + k_b + 1\right) \leqslant \frac{a \sqrt{y}}{2b}$
then
$c \times |x|_\boldsymbol\ell \leqslant x$
Rearranging yields a constraint upon $$y$$ of
$\sqrt{y} - k_y \geqslant 2k_a + 2k_b + 2$
The smallest number with $$k$$ prime factors is trivially $$2^k$$ and so if we can satisfy this constraint with some $$k_y$$ such that
$2^{\frac12 k_y} - k_y \geqslant 2k_a + 2k_b + 2$
then we may choose
\begin{align*} k &= \max\left(k_y, 4\right)\\ x^\ast_c &= \frac{a \sqrt{2^k}}{2b} = \tfrac12c \times \sqrt{2^k} \end{align*}
since, for $$k$$ greater than or equal to four
$k^\prime > k \to 2^{\frac12 k^\prime} - k^\prime > 2^{\frac12 k} - k$
and, since no number less than $$2^k$$ can have $$k$$ or more prime factors
$y^\prime > y \to \sqrt{y^\prime} - k_{y^\prime} > \sqrt{y} - k_y$
Given that the left hand side of the inequality for $$k_y$$ is unbounded and the right hand side is constant we shall most assuredly be able to find a satisfactory value for it and we may safely conclude that the terms of the sequence are indeed bounded from above.

To investigate how these bounds manifest themselves, my fellow students and I assembled a seventh deck to plot the logarithms of the maximum values in the sequences generated by repeated forced magnitudes with rational constants given by $$x$$ divided by $$y$$.

Deck 7: Maxima Of Orbits Forced By x/y

Clearly there is a good deal of structure to be found here! The radial spokes are simply those values of $$x$$ and $$y$$ for which the rational forcing constant is either an integer or the reciprocal of an integer. The rectilinear grid, however, is formed from those rationals that have large powers of the prime factors in both their numerators and their denominators.
That this has such clear structure set us to wondering whether it should be reflected in the lengths of the orbits created with these rationals and so we put together a final deck to plot them, with black representing a collapse to zero and red to white representing the shortest to the longest orbits.

Deck 8: Lengths Of Orbits Forced By x/y

Whilst nothing like as clear as that of the maximum values, we fancied that we could spy the ghost of a rectilinear structure in this plot of the orbit lengths. Unfortunately it was not sufficient to suggest to us a means to reckon the lengths of orbits from the values of their forcing constants.

We have not yet completed our exploration of $$\boldsymbol\ell$$-space, however, and plan to return to its strange shores just as soon as our studies permit.
$$\Box$$

### References

[1] On Natural Analogarithms, www.thusspakeak.com, 2018.