Suppose I want to find integers such that when I multiply it by an irrational number (e.g $\sqrt{2}$), its decimal part contains 0.14159... as starting digits. How do I find them? Is there a pattern for the digits of such numbers?
Find an integer $a$ such that $a\sqrt{2} $ has a given decimal part
377 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail AtThere are 4 best solutions below
On
It is fairly easy to compute $\sqrt{2}$ to arbitrarily high precision. See for example this page reporting a little more than one million digits.
If we are searching for a fixed initial string of length $n$, then of course if it can be located in $\sqrt{2}$ further along, that string can be brought to the front by multiplying by the appropriate power of ten. One then has a (not necessarily minimum) solution for $a$. In this case the string "14159" is found seven times within the first million digits.
Finding the minimum value of $a$ seems to be a difficult computational challenge.
On
The equidistribution theorem says that if $\alpha$ is an irrational number, then the sequence of fractional parts, $k\alpha-\lfloor k\alpha\rfloor$, for $k\in\mathbb{N}$, is equidistributed in $[0,1]$. In particular, the interval $(0.14159,0.14160)$ will, in the limit, be visited on average once every $100{,}000$ multiples. More generally, any opening string of $n$ digits will occur on average once every $10^n$ multiples.
On
I suggest the following approach. Suppose we have an irrational number $\alpha$ and want to have some $n\in\mathbb N$ such that the fractional part of $n\alpha$ equals some goal $x$ with certain precision.
- Start with $n=0$.
- Take $q$, the denominator of the first convergent of $\alpha$. Find the step size: number from $(-0.5,0.5]$ equivalent modulo 1 to the fractional part $\{q\alpha\}$.
- Add step to $n\alpha$ (that is, add $q$ to $n$) as many times as it takes to get $\{n\alpha\}$ as close to the goal as possible, without wrapping around 1. For example, if step size is 0.13 and the goal is 0.69, then add 5 times. It may turn out (like it does with $\alpha=\sqrt2$ and $x=0.14159$) that making even one step takes us farther away from the goal than we were; then don't make it at all, i.e., make 0 steps.
- Take the next convergent and repeat.
- Move on to the next convergent, and continue in this manner until we reach $x$ with desired precision.
This method is guaranteed to work on any irrational $\alpha$ and is not hinged on the hypothesis of its normality. Also, it is pretty fast. Denominators always grow exponentially or faster, so you'll need at most $O(n)$ convergents to achieve the precision of $n$ digits. As for finding the minimum possible solution, I don't think it guarantees that (why would it?), but I expect it to fall reasonably close - that is, less than an order of magnitude away.
Upd. I've ran some tests and behold, it does find the minimum solution more often than not.
$$\begin{array}{lll} \text{Goal} & n\text{(my method)} & n\text{(min.)} \\ 0.14159 & 176827 & 96045 \\ 0.71828 & 59937 & 59937 \\ 0.73205 & 28067 & 28067 \\ 0.61803 & 2126 & 2126 \\ 0.33333 & 76162 & 76162 \\ \end{array}$$
Now what about complexity?
$$\begin{array}{lll} \text{Goal} & n & \text{Convergents used} \\ 0.1415 & 9522 & 12 \\ 0.14159 & 176827 & 15 \\ 0.141592 & 1118491 & 17 \\ 0.1415926 & 8880289 & 19 \\ \end{array}$$
We can show that there exists no integer such that $a \cdot \sqrt{2}$ has the full decimal part of $\pi$. Suppose there were such an integer $a$ such that $a \cdot \sqrt{2} = B + \pi -3$, where $B \in \mathbb{Z}$. Then, we would also have that $a \cdot \sqrt{2} + 3 -B = \pi$. But then notice that the LHS is an algebraic number, whereas the RHS is a transcendental number. Contradiction.