103

Many years ago, I noticed that $987654321/123456789 = 8.0000000729\ldots$.

I sent it in to Martin Gardner at Scientific American and he published it in his column!!!

My life has gone downhill since then:)

My questions are:

  • Why is this so?

  • What happens beyond the "$729$"?

  • What happens in bases other than $10$?

MR_BD
  • 5,942
marty cohen
  • 107,799
  • 4
    Do you intend to send the answers to him again? :D – Mikasa May 19 '13 at 07:09
  • For what happens after 729, WA – Milind Hegde May 19 '13 at 07:10
  • 16
    8.000000072900000663390006036849054935326399911470239194379176... – copper.hat May 19 '13 at 07:10
  • 126
    I don't see it, why is this number interesting? – Matsemann May 19 '13 at 09:43
  • 26
    8.0000000729000006633900060368490549353263999114702391943791766688505076865396199475105415223459278533479434654662855357431983752631052148942574555377428453934598930804850270324137459949650885541823058430589831718367468637143964598010077841891708361214546087052369392176561468806709366141055231883602610140783752281132145758302526400552990245032211229793122191117411939168448646432882682539232411107014941073835963771907270324356159951641055559933605595395810918101879354727102128016629364951327221057077711619407175736605299203108222748284827009391925785466524647745374294482906079794445326129452467 – Double AA May 19 '13 at 10:29
  • 17
    Unrelated, but ever notice that Sqrt(9.87654321) approximates pi? The number system is full of this kind of stuff. – cobaltduck May 19 '13 at 11:44
  • 27
    @cobaltduck: It is a terrible approximation given how many digits you're putting in. It has more than $10$ times the error of $\sqrt{9.87}$ – Jonas Meyer May 19 '13 at 18:28
  • 7
    When a number turns out to be an almost-integer, it often has some deep meaning (but not in this example, since it's rational). See also http://math.stackexchange.com/questions/4544 and http://mathoverflow.net/questions/4775 and http://mathoverflow.net/questions/30787 and http://mathoverflow.net/questions/27931 ... – Martin Brandenburg May 19 '13 at 22:26
  • 4
    "The number system is full of this kind of stuff." A statement that seems to involve so much confusion it's difficult to know where to start. – jwg May 21 '13 at 08:10
  • 6
    I'm sorry, could you explain the "my life went downhill"-line for me? – Nikolaj-K May 21 '13 at 21:33
  • Which other bases do you want to look at? Does there exist much difference in base 1,000,000,000 and base 2,000,000,000? Or how do base 3 and base 9,999,999,999,999,999,999 compare? I think the base question could use more focus. – Doug Spoonwood May 22 '13 at 14:27
  • 5
    Or why is it that exp(pi) - pi = 19.9990999792 ... (Source: https://xkcd.com/217/) – Rulle Jun 07 '13 at 19:40
  • 2
    @Matsemann It's interesting because: 123456789... are not arbitrarily chosen (they already satisfy very restrict constraints) and their quotient is extremely close to 8 to many digits, wich is also satifying another constraint (almost a integer). – Santropedro Dec 10 '16 at 19:06
  • 1
    I actually composed a short article on this ratio. Do give it a read - https://www.cambridge.org/core/journals/mathematical-gazette/article/div-classtitle9928-a-generalisation-of-an-intriguing-ratiodiv/6688DB8213733D58735DCE3534D02991 – V-Red Jun 28 '17 at 01:27
  • @V-Red it seems to be behind a paywall. – jwg Jun 28 '17 at 10:10
  • Oh right. CUP access is needed typically. Anyways, check this out: https://drive.google.com/open?id=0B1TSPDPrtCQubkt6T2JjV0t6R2VDVHliMjNyQTd1bTVyM1Br – V-Red Jun 28 '17 at 13:53
  • 7
    On the other hand, 98765432/12345679=8 is exact – Akiva Weinberger Jul 10 '17 at 23:43
  • @AkivaWeinberger Yes, a neat proof is presented at https://www.cambridge.org/core/journals/mathematical-gazette/article/9103-an-elegant-arithmetical-relationship-and-its-generalisation/04CF83C90903D196A467B899AD3ADF9D – V-Red Feb 05 '18 at 21:47

8 Answers8

139

In base $n$ the numerator is $$p = n^{n-1} - \frac{n^{n-1}-1}{(n-1)^2}$$ and the denominator is $$q = \frac{n(n^{n-1}-1)}{(n-1)^2}-1.$$

Note that $p = (n-2)q + n-1$ and for the quotient we get

\begin{align} \frac{p}{q} &= n-2 + \frac{(n-1)^3}{n^n} \frac{1}{1 - \frac{n^2-n+1}{n^n}} \\ &= n-2 + \frac{(n-1)^3}{n^n} \sum_{k=0}^{\infty} \left(\frac{n^2-n+1}{n^n}\right)^k. \end{align}

Indeed for $n=10$ this is

$$\frac{987654321}{123456789} = 8 + \frac{729}{10^{10}}\sum_{k=0}^{\infty}\left(\frac{91}{10^{10}}\right)^k $$

cookie
  • 69
  • 6
WimC
  • 32,192
  • 2
  • 48
  • 88
74

$$729=9^3$$ $$66339=9^3\cdot 91$$ $$6036849=9^3\cdot 91^2$$ $$...$$ $$987654321/123456789=8+9^3\cdot 10^{-10}\cdot\displaystyle\sum_{n=0}^{\infty}(91\cdot 10^{-10})^n$$

43

Let $$S_n(a)=1 +2a+\ldots +na^{n-1}=\frac{na^{n+1}-(n+1)a^n+1}{(a-1)^2},$$ $$T_n(a)=a^{n-1}+2a^{n-2}+\ldots +n=a^{n-1}S_n(a^{-1}).$$

Then $$ \frac{S_n(a)}{T_n(a)}=\frac{na^{n+1}-(n+1)a^n+1}{a^{n+1}-(n+1)a+n}.$$ For $a=10,n=9$ we have $$ \frac{S_n(a)}{T_n(a)}\approx\frac{8\cdot 10^{10}+1}{10^{10}}. $$

Boris Novikov
  • 17,470
32

Just to add to the excellent answers above, some examples:

${987654321\,/\,123456789}\approx 8.00000007290000066339$

${{87654321}_9\,/\,{12345678}_9}\approx {7.000000628000056238}_9$

${{7654321}_8\,/\,{1234567}_8}\approx {6.0000052700046137}_8$

${{654321}_7\,/\,{123456}_7}\approx {5.00004260036036}_7$

${{\mathrm{fedcba987654321}}_{16}\,/\,{\mathrm{123456789abcdef}}_{16}}\approx {\mathrm{e.0000000000000d2f00000000000c693f}}_{16}$

Mark Adler
  • 1,029
  • And what do these numbers show?? – Matsemann May 21 '13 at 19:04
  • 11
    They show empirically that the behavior seen in base 10 is present for all bases. – Mark Adler May 21 '13 at 20:13
  • 3
    And what behavior is that? I asked in a comment to the question what's so interesting about this, no one has answered. – Matsemann Jun 13 '13 at 08:59
  • 12
    The behavior is that the result is extremely close to the base minus two. Like a joke, if it has to be explained to you, it won't be funny. If you weren't intrigued by this when you first saw it, then you probably never will be. – Mark Adler Jun 13 '13 at 15:00
  • No, they show empirically that the behavior seen in base 10 is present for bases 9, 8, 7 and 16. – jwg Jun 28 '17 at 10:09
19

$98765432 / 12345679 = 8$, exactly. You can see how the pattern works by multiplying out $12345679 * 8$ starting at either end.

This explains why your fraction is close to an integer. If you think the $729$ is interesting (I don't), it can be explained by some of the other answers here.

Edit:

What can we say about the fact that $12345679 * 8 = 98765432$? I have been aware of this 'factlet' for about 20 years, and remember it being used to 'demonstrate' calculators (which often had 8 digit displays back in the day).

I just recently realised that:

$$ \frac{1}{81} = \left(\frac{1}{9}\right)^2 = \left(\sum_{k=1}^{\infty}\frac{1}{10^k}\right)^2 = \sum_{k=1}^{\infty} \sum_{m=1}^{k-1} \frac{1}{10^m} \frac{1}{10^{k-m}} = \sum_{k=1}^{\infty} \frac{k-1}{10^k} $$

In other words, while $\frac{1}{9} = 0.1111111\ldots$ $$ \frac{1}{81} = 0.01 + 0.002 + 0.0003 + 0.0004 + 0.00005 \ldots $$

It is pretty easy to see that this infinite sum is going to converge to something starting $0.012345\ldots$. If you keep on adding, or work out $\frac{1}{81}$ by division, you get $$ 0.012345679012345679012345679\ldots $$ When you get to the point where you add $\frac{10}{10^{11}}$, the first carry happens, which leads to the 9 where you might expect an 8. After that every addition carries and the decimal expansion repeats every 9 digits (not every ten - because the amount we carry keeps on getting bigger and bigger).

Now, $\frac{8}{81} = \frac{9}{81} - \frac{1}{81}$, or $$ \frac{8}{81} = 0.11111111\ldots - 0.012345679012345\ldots $$ Think of each '1' digit in $0.111\ldots$ as being a '10' in the next column. This means that we can work out $\frac{8}{81}$ as the "10's complement" of $\frac{1}{81}$, since we are subtracting a digit between $1$ and $9$ from $10$, to get another single digit which appears in the same place. So $\frac{8}{81}$ starts $0.098765\ldots$. The only break in the pattern is when you get to the digit '0' - subtracting 0 from 10 leaves you with 10, or a '1' in the next digit on the left, changing the 1 to a 2.

So $$ \frac{8}{81} = 0.098765432098765432098765\ldots $$

and therefore $$ 0.0123456790123456790\ldots * 8 = 0.0987654320987654320\ldots $$ and clearly this gets you that $$ 12345679 * 8 = 98765432 $$

jwg
  • 2,766
3

I think @BorisNovikov's answer is the best here, but I had to do some work to understand it; this is my attempt at clarifying his answer, hopefully this can help others too:

In the following, we adopt the notation $123456789 = [ 1, 2, ..., B-1 ]_B$ in base $B=10$.

Boris introduced the following sum: $$ S_d(B) = [d, d-1, ..., 1]_B = 1 + 2B + ... + dB^{d-1} = \sum_{k=1}^d kB^{k-1} = \frac{dB^{d+1} - (d+1)B^d + 1}{(B-1)^2} $$ where $d$ is the number of digits, $B$ the base, and the final formula is obtained by derivation of the usual geometric sum.

From there, it is easy to see that: $$ [1, 2, ..., d]_B = d + (d-1)B + ... + 1B^{d-1} = B^{d-1} S_d(1/B) $$ and putting both results together, we have: $$ \frac{ [B-1, B-2, ..., 1]_B }{ [1, 2, ..., B-1]_B } = \frac{ S_{B-1}(B) }{ B^{B-2} S_{B-1}(1/B) } = \frac{1 + (B-2)B^B}{B^B - B(B-1) - 1} $$

Clearly both the numerator and denominator are dominated by the terms in $B^B$, so this fraction is equivalent to $B-2$ as $B$ tends to infinity, and we can see that the exact value is very close already for $B=10$ (see also @Mark Adler's post for other examples). Beautiful, isn't it? :)

Jonathan H
  • 2,233
  • 16
  • 29
2

I think one should also think about how this is related to 9 being before 10. Notice the two following striking facts:

$12345679*8=98765432$ and $12345679*9=111111111$

1

An identity:
$[B-1,B-2,...,1]_B - 1 = $ $=(B-2) ([1,2,...,B-1]_B+1)$
A way to show this general identity goes as follow (we shall use base B and exactly B ciphers):

  1. $[0,B-1,B-2,...,2,1]+[0,1,2,...,B-2,B-1]=[1,1,...1,1,0]$
  2. $[1,1,...,1,0]+[0,1,2,...,B-1]=[1,2,...,B-1,B-1]$
    So that:
    $[0,B-1,B-2,...,1]+2[0,1,2,...,B-1]=[1,2,...,B-1,0]+B-1=B[0,1,2,...,B-1]+B-1$
    Then in terms of B-1 ciphers numbers: $[B-1,B-2,...,1]=(B-2)[1,2,...,B-1]+B-1$
    and: $$[B-1,B-2,...,1]-1=(B-2)[1,2,...,B-1]+B-2=$$ $$=(B-2)([1,2,...,B-1]+1)$$ So that the division proposed to Martin Gardner, by you, was very close to $\frac{[B-1,B-2,...,1]-1}{[1,2,...,B-1]+1}=B-2$ for B = 10. In fact, posing $N=[0,B-1,...,1]$ and $D=[0,1,...,B-1]$, we get: $N/D-(B-2) = N/D - (N-1)/(D+1)=$ $=[N(D+1)-(N-1)D]/[D(D-1)]=(2D+N)/[D(D-1)]$ where the numerator has B ciphers and the denominator 2(B-1) ciphers, and the quotient will be a number with $B-3$ null ciphers after the decimal separator sign.
Tetis
  • 103