Numbers whose self and reciprocal are finitely decimally expressable that are close to one?

693 Views Asked by At

How would I go about finding numbers x such that x and 1/x are finitely decimally reciprocal and are also close to 1?

I'm not entirely certain how to phrase this question, but take for example 2. 2 and 1/2 can be represented with a finite number of decimal points.

The closest pair to 1 that I have found is 4/5 and 5/4. Are there closer pairs and how would I look for them?

3

There are 3 best solutions below

5
On BEST ANSWER

The only rational numbers that have finite decimal representations are those whose denominator has only $2$ and $5$ as its prime factors. (because if $z$ has a finite decimal expansion, then $y=10^k z$ is an integer for some positive integer $k$, and thus $z = y/10^k$)

Thus, the pairs you are looking for are all of the form $2^m / 5^n$ and $5^n / 2^m$.

To see when they're close to 1, it's easier to turn it into an additive problem by taking logarithms: you want

$$ m \ln 2 - n \ln 5 \sim 0 $$

Rearranging, we want

$$ \frac{m}{n} \sim \frac{\ln 5}{\ln 2} $$

so the problem is to find very good rational approximations to $\ln 5 / \ln 2$.

The first few approximations given by continued fractions is:

  • $m/n = 2$, and thus $x = 4/5 = 0.8$
  • $m/n = 7/3$, and thus $x = 2^7 / 5^3 = 1.024$ and $1/x = 0.9765625$
  • $m/n = 65/28$, and thus $x = 2^{65}/5^{28} = 0.99035\ldots$
0
On

What you need is a power of $2$ and a power of $5$ which are close together. Your example has $4=2^2$ and $5=5^1$.

Since powers of $2$ are a multiple of $2$ apart, you can always get between $\frac 12$ and $2$.

To get the best results, though, we want $5^n=k2^m$ where $k$ is close to $1$.

Taking logs we have $n\log 5 = \log k + m\log 2$ and since $k$ is near to $1$ we have $\log k$ close to zero, and we see that $$\frac nm\approx\frac{\log 2}{\log 5}$$ and the best way of getting close is to use the continued fraction expansion of $\frac{\log 2}{\log 5}$.

0
On

As an "extended" comment, adding to the above posts, we have $$\frac{\ln 2}{\ln 5}\approx 0.43067655807339306$$

The first few "best approximations" for that decimal are (research the Stern-Brocot Tree) $$[(2, 5, 0.4), (3, 7, 0.42857142857142855), (34, 79, 0.43037974683544306), (31, 72, 0.4305555555555556), (205, 476, 0.43067226890756305), (497, 1154, 0.4306759098786828), (643, 1493, 0.4306764902880107), (4647, 10790, 0.4306765523632993), (21306, 49471, 0.43067655798346505), (21306, 49471, 0.43067655798346505), (97879, 227268, 0.4306765580724079), (1740516, 4041353, 0.4306765580734967), (2034153, 4723157, 0.4306765580733395), (1936274, 4495889, 0.4306765580733866), (15392313, 35739844, 0.43067655807339283), (59632978, 138463487, 0.430676558073393)]$$ where the pairs are $(m,n,\text{decimal})$ for $5^m,2^n$.

And I broke my computer trying to compute the last decimal, so I'll be back with the outputs of those numbers...

Some results are $${5^{205}\over 2^{476}}=0.9967194951\dots$$ and $${5^{59632978}\over 2^{138463487}}=0.9999999850988389 \dots$$