a4lg.com

Mystery of 1/9998 ― Making it with Infinite Series

I apologize that translation of this page from Japanese is not so good.

1/9998 = 0.0001 0002 0004 0008 0016 0032 0064 0128 0256.. from Hacker News showed us some interesting fractions. In this article, we prove the properties of this fraction using theorem regarding infinite geometric series and make some interesting fractions ourself.

Proving Properties of 1/9998

Look at 1/9998 (in general, 110k-2). If you split decimal representation each 4 digits, it appears power of two (1,2,4...).

1/9998  = 0. 0001 0002 0004 0008 0016 0032 0064 0128 0256 0512 1024 2048 4096  ...
1/99998 = 0. 00001 00002 00004 00008 00016 00032 00064 00128 00256 00512 01024 ...

This is no coincidence. Subsequent 4 digits from 1/9998 is 8193 (not 8192) but this is the result which subsequent "four" (overflown) digits 16384 are added. This pattern continues endlessly and despite that, decimal representation makes a cycle (For 1/9998, length of cycle is 357).

0. 0001|0002|0004|0008|0016|0032|0064|0128|0256|0512|1024|2048|4096|8193|6387|2774|5549|...
      1|    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |
           2|    |    |    |    |    |    |    |    |    |    |    |    |    |    |    |
                4|    |    |    |    |    |    |    |    |    |    |    |    |    |    |
                     8|    |    |    |    |    |    |    |    |    |    |    |    |    |
                         16|    |    |    |    |    |    |    |    |    |    |    |    |
                              32|    |    |    |    |    |    |    |    |    |    |    |
                                   64|    |    |    |    |    |    |    |    |    |    |
                                       128|    |    |    |    |    |    |    |    |    |
                                            256|    |    |    |    |    |    |    |    |
                                                 512|    |    |    |    |    |    |    |
                                                    |1024|    |    |    |    |    |    |
                                                         |2048|    |    |    |    |    |
                                                              |4096|    |    |    |    |
                                                                   |8192|    |    |    |
                                                                       1|6384|    |    |
                                                                            3|2768|    |
                                                                                 6|5536|
                                                                                     13|1072
                                                                                          ...

This property is easily provable. If you make 4-digit chunks for 1/9998, it leads:

1/9998 = 0.0001
       + 0.0000 0002
       + 0.0000 0000 0004
       + 0.0000 0000 0000 0008
         ....

19998=201041+211042+221043+231044=1104Σn=02104n

You could transform it into the sum of infinite geometric series. Now we are going to generalize with a parameter ("chunk" size) k and apply formula regarding sum of infinite geometric series.

110kΣn=0210kn=110k11-210k=110k-2

k=4 makes 1/9998 back. This generalized formula is valid for all integer k which satisfy k>0. For instance, even a finite decimal 1/8 (0.125) made by parameter k=1 satisfies this property like:

1/8 = 0.125
        1||
         2|
          4
           8
           16
            32
             ...

General pattern suggests adding digit "9" at the left of denominator increases size of "chunk" by one.

Let's Make some More!

In the Hacker News article, there are some interesting examples. Let's try making it.

0.0001 0001 0001 0001 0001 0001...

First, let's make a fraction which (4 or k-digits of) chunks make one.

1/9999 = 0.0001
       + 0.0000 0001
       + 0.0000 0000 0001
       + 0.0000 0000 0000 0001
         ....

19999=101041+111042+121043+131044=1104Σn=01104n

Let's generalize with parameter k...

Σn=1110kn=110kΣn=0110kn=110k11-110k=110k-1

This is the source of other interesting fractions

0.0001 0002 0003 0004 0005 0006...

Next, we can make a fraction such chunks make sequence of 1, 2, 3, 4... Thinking carefully, you can consider this number as a sum of sum of infinite geometric series.

    0. 0001 0002 0003 0004 0005 0006 ...
=   0. 0001 0001 0001 0001 0001 0001 ...
          + 0001 0001 0001 0001 0001 ...
               + 0001 0001 0001 0001 ...
                    + 0001 0001 0001 ...
                         + 0001 0001 ...
                              + 0001 ...
                                     ...
=   1. 0001 0001 0001 0001 0001 0001 ...
  * 0. 0001 0001 0001 0001 0001 0001 ...

Formulizing, is easy.

Σn=0n10kn=110k-1Σn=0110kn=110k-111-110k=10k10k-12

k=3 makes 1/998001 = 0.000 001 002 003... on a Hacker News post.

0.0001 0003 0006 0010 0015 0021... (Triangular numbers)

Using previously calculated numbers, we can easily create sequence of triangular numbers. Principle, is same.

  0. 0001 0003 0006 0010 0015 0021 ...
= 0. 0001 0002 0003 0004 0005 0006 ...
        + 0001 0002 0003 0004 0005 ...
             + 0001 0002 0003 0004 ...
                  + 0001 0002 0003 ...
                       + 0001 0002 ...
                            + 0001 ...
                                   ...

Σn=0Σm=0nm10kn=10k10k-12Σn=0110kn=10k10k-1211-110k=102k10k-13

k=3 makes 1000/997002999 = 0.000 001 003 006... on a Hacker News post.

0.0001 0004 0009 0016 0025 0036... (Square numbers)

It's a bit tricky to calculate fraction which makes sequence of square numbers 1, 4, 9 (1^2, 2^2, 3^2...) but if you could understand calculation of previous sequences, it's not THAT difficult. First, let's make sequence of odd numbers (1, 3, 5...) for later calculation.

  0. 0001 0003 0005 0007 0009 0011 ...
= 0. 0001 0001 0001 0001 0001 0001 ...
        + 0001 0002 0003 0004 0005 ...
        + 0001 0002 0003 0004 0005 ...

You calculated both sequences before. So you can transform and expand the formula.

110kΣn=02n+110kn=110kΣn=0110kn+2Σn=0n10kn=110k10k10k-1+210k10k-12=110k102k-10k+210k10k-12=10k+110k-12

The reason I made sequence of odd numbers is, if you take first n odd numbers and make a sum, it always makes square numbers (1=1^2=1, 4=2^2=1+3, 9=3^2=1+3+5...).

  0. 0001 0004 0009 0016 0025 0036 ...
= 0. 0001 0003 0005 0007 0009 0011 ...
        + 0001 0003 0005 0007 0009 ...
             + 0001 0003 0005 0007 ...
                  + 0001 0003 0005 ...
                       + 0001 0003 ...
                            + 0001 ...
                                   ...

Now you can make generalized formula.

Σn=0n210kn=10k+110k-12Σn=0110kn=10k+110k-1211-110k=102k+10k10k-13

k=3 makes 1001000/997002999 = 0.001 004 009 016... from a Hacker News post.

0.0001 0001 0002 0003 0005 0008... (Fibonacci numbers)

This fraction makes a problem. Proving is not extremely hard, but we have to use very different method to make. So I will show you the formula without proofs. Following general formula to make fraction is calculated using formula found on "Fibonacci number" entry from English version of Wikipedia.

Σn=0Fn10kn=10k102k-10k-1

k=3 makes 1/998999 = 0.000 001 001 002 003 005 008... from a Hacker News post.

Exercise: Sequence of Cubic numbers

Make a fraction which k-digit chunks from fraction's decimal representation makes cubic numbers 1, 8, 27 (1^3, 2^3, 3^3...). You can actually reduce it but for now, leave denominator 10k-14. You can calculate with exponent of four and five and you will see the pattern.

Hints

  • Just like sequence of square numbers, you can use the method making sequence that sum of first n elements makes n^3. You could use this: n3-n-13=3n2-3n+1
  • However, beware for minimum number appears in sigma operator.
  • For all p>0, Σn=1np10kn=Σn=0np10kn
  • Σn=1110kn=110kΣn=0110kn

Answer / Further More

Display Answer

Σn=0n310kn=103k+4102k+10k10k-14

Exponent of four and five makes following formulas.

Σn=0n410kn=104k+11103k+11102k+10k10k-15
Σn=0n510kn=105k+26104k+66103k+26102k+10k10k-16

Coefficients found in polynomial in the numerator relates Eulerian number. More of that, Eulerian polynomial appears in the numerator. That means we can make these series of formula much general. Assuming Anm as a Eulerian number corresponding n and m, we can make general formula.

Σn=0np10kn=Σm=1pApm-110km10k-1p+1

For the record, formula for exponent three (or more) has a prime factor of 3 in both in numerator and denominator. (For denominator, it's easy and clear. For numerator, it's not THAT easy but you can prove using theorem regarding modulo by three and sum of certain Eulerian numbers.) So you can reduce the fraction by 3 (at least). A fraction which makes sequence of cubic numbers found on Hacker News 334667000/332001998667 = 0.001 008 027 064... is a reduced form of fraction.