by crntaylor · 12y ago · 0 comments
The reason it works is that 9998 = 10^4 - 2. You can expand as
1 / (10^n - 2) = 1/10^n * 1/(1 - 2/10^n)
= 1/10^n * (1 + 2/10^n + 2^2 /10^2n + 2^3 /10^3n + ...)
which gives the observed pattern. It breaks down when 2^k has more than n digits, which happens approximately when 2^k > 10^n => k > n log(10) / log(2)
which comes out to 4 * log(10)/log(2) = 13.28 when n = 4.---
Another pattern can be generated from the power series expansion
x / (1 - x)^2 = x + 2x^2 + 3x^3 + 4x^4 + ...
setting x = 1/10^n gives the infinite series 1/10^n + 2/10^2n + 3/10^3n + ...
which leads to the neat fact that 1 / 998001 = 0.000 001 002 003 004 005 006 007...
---Another example is the fraction
1000 / 997002999 = 0.000 001 003 006 010 015 021 ...
which goes through the triangle numbers[0] in its expansion, or 1 / 998999 = 0.000 001 001 002 003 005 008 013 021 ...
which goes through the Fibonacci numbers[1].---
Getting the squares is harder, but you can do it with
1001000 / 997002999 = 0.001 004 009 016 025 036 049 ...
[0] http://en.wikipedia.org/wiki/Triangle_number1/998999 1/99989999 1/9999899999
To get more 0 spacing and avoid overflow
It doesn't actually:
4096 8193 6387
= 4096+8192
+ 1 6384
+ … 1 / (10000 - 2) = 1/10000 * 1/(1 - 2/10000)
Notice that the sum of a geometric series is: 1/(1 - x) = sum_k( x^k )
1/(1 - 2/10000) = sum_k( (2/10000)^k )
So: 1/10000 * 1/(1 - 2/10000) = 1/10000 * (1 + 2/10000 + 2^2/10000^2 + 2^3/10000^3 + ...)