Nearest equi-decimal neighbour problem

4 minute read

Recently, I was thinking about square numbers. There are all kinds of numbers which are interesting, with some kind of unique property. I’d argue that one of the most common examples would be the number $\phi$. By definition: $\phi^2=\phi+1$. I wondered if other numbers were perhaps more complex but equally mysterious.

What I considered was a decimal number such as $x=1.121324132\dots$. This is just an arbitrary number for demonstrative purposes, with an infinite tail of decimal digits.

This is where I defined myself and interesting function $\Lambda : \mathbb{R} \mapsto \mathbb{R}$. I chose capital lambda for the function character for a reason taken from computer science. In computational theory, $\lambda$ is a string, which is similar to this problem, so I felt it natural to use.

I defined $\Lambda$ such that it takes a number $x$and returns what I call its neighbourhood encoding. From before, $x=1.121324132\dots$, and $\Lambda(x)=1.23444\dots$. What is happening is that each digit $d_i^x\in x$ is replaced with a digit equal to the number of places to the right the next digit of equal value occurs.

Perhaps a simpler example would be for $x=1.010101\dots$ which gives an encoding of $\Lambda(x) = 2.222222\dots$.

This curious encoding makes me think if a number exists that encodes its own neighbourhood. Specifically, I asked myself if there exists a number such that:

$\exists \lambda, x \in \mathbb{R} : \lambda = \Lambda(x) \Rightarrow \lambda = x^2$

Understanding ENNs

I have tried manually crunching some numbers that seemed elementary, as well as attempt to work backwards in an effort to decode a number, only to find there seems to be a few rules that such a number must follow.

  • Firstly, the encoded neighbourhood numbers (ENNs) cannot have a zero in the number. If it did, that would mean that the next digit was zero digits away. This seems paradoxical since if a number has infinite digits (including an infinite trail of zeros), then the next nearest equi-decimal neighbour would be at least one digit to the right. I have decided to keep in mind, however, that if there does exist an algorithm to find such a number, then perhaps it is a number with a finite size. Perhaps a zero indicates the end of the encoding — much like a <!JEKYLL@47063322314200@0>, the null-terminator value in byte-arrays, or that there are no more numbers of that value.
  • Secondly, a digit within the ENN cannot be one less than the number before it. Take the ENN $\lambda = 1.213\dots$. In the decoded $\Lambda^{-1}(\lambda)$ number, whatever digit is in the second and third position would be equal to the digit in the fourth index position. This is a contradiction, however, because the second digit claims the closest equi-digital number is two digits away. The number directly following claims to be of that same value, making it closer to the previous number, which is a contradiction.
  • Finally, there is a case I have considered which I am yet to find a way to categorise, which has led me to what I will discuss in just a moment. Suppose an equi-decimal digit is more than nine positions to the right. How does this become encoded? Do we take the modulo 10 case? That would cause contradictions, much like what was discussed in the previous point. But then, if it is represented normally, there is no way to distinguish the digits. What I mean is, if a digit is 13 values to the right, how do we read it as 13 and not as a 1 followed by a 3? Thus, I am considering the case where there is no such digit greater than nine digits to the right. Although it is not a proof that it cannot happen, the fact implies it must be an added constraint to define an ENN.

An attempt to analyse the numbers

Lets take our $x$ value and describe it in the form $x=d_1.d_2d_3\dots$. Also, note that there may be multiple digits before the decimal point. Thus we can rewrite the number as:

$x = \displaystyle \sum^{\infty}_{i=1}{d_i\cdot{10}^{k-i}} \quad \text{where } k\in\mathbb{Z}$

This helps to separate each digit into its own identity. As an example:

$1.123 \dots = 1 \cdot 10^{0}+1\cdot10^{-1}+2\cdot10^{-2}+3\cdot10^{-3}+\dots$

Next, we have to think about how squaring a number operates. This is my current interest and research: how can we “informatively” square a decimalised number? Well, applying the above, we can see that:

$x^2 = d^x_1\cdot10^{k-1}x + d^x_2\cdot10^{k-2}x + \dots\quad \text{where }d^x_i\text{ is the }i^{\text{th}}\text{ digit of }x$

This is more or less as far as I have come in terms of progress. I have been looking into deriving an algorithm that somehow optimises each additive element of $x^2$ such that the $d^x_i\cdot10^{k-i}$ multiplied by $x$ is nudged towards the correct value. The algorithm would both attempt to solve the square number calculation and also alter the input and recalculate the square to accurately limit to a value such that $\lambda=x^2$.

Mathematically, I currently have no vision of how I could solve and find a solution or proof that such a number does not exist. It would be interesting to find out that there is a solution, and if there is a solution, is there other cases for $\lambda = x^n$? Are there finitely or infinitely many of these numbers for each case? So many questions and currently no answers. It is still fun to ponder over, however.