Live data from Hacker News

1/9998 = 0.0001 0002 0004 0008 0016 0032 0064 0128 0256..

wolframalpha.com

61–70 of 109 posts

Re: 1/9998 = 0.0001 0002 0004 0008 0016 0032 0064 0128 0256..

#63

I gotta be that guy: Why is this the first post on the front page of Hacker News? Is basic arithmetic really so fascinating to the computer people?

If more math geeks thought these patterns were religious, we could call this Numerology. We could probably make the case that there are an infinite number of "interesting" patterns that can be generated as the result of "simple" arithmetic. That math geeks assign meaning to these numbers such as as proof of a sane, beautiful universe or a universe with a sense of humor is just human nature.

See also the Interesting number paradox[1].

1. http://en.wikipedia.org/wiki/Interesting_number_paradox

Re: 1/9998 = 0.0001 0002 0004 0008 0016 0032 0064 0128 0256..

#64
post #28

Reminds me of being bored in high school.

"Let's say you're me, and you're in math class, and you're supposed to be learning about exponential functions but you're having trouble caring..." https://www.youtube.com/watch?v=e4MSN6IImpI Vi Hart's whole channel is great, and most of the videos start like that.

Re: 1/9998 = 0.0001 0002 0004 0008 0016 0032 0064 0128 0256..

#65

Here's a generalization for any arithmetic sequence. With first term a0, difference d, and digit "padding" of n, the fraction that will result is: (a0 + (d - a0)(1/10^n)) / (1 - 1/10^n)^2 For instance the sequence 1, 4, 7, 10, 13... (1 + (3 - 1)(1/10^2)) / (1 - 1/10^2) = 1.02 / 0.9801 = 3400/3267 = 1.004 007 010 013 016... For any kind of recursive sequence, you can find its generating function G(x) and then substitu…

Neat! Not familiar though with generating functions - can you pls explain how the generating function for the Fibonnaci sequence is x/(1 - x - x^2 ) ?

Generating functions are amazing. One of the coolest topics in my entire undergrad math degree. This PDF is well written and will explain everything: http://courses.csail.mit.edu/6.042/fall05/ln11.pdf

Re: 1/9998 = 0.0001 0002 0004 0008 0016 0032 0064 0128 0256..

#66
The techniques of constructing such sequences have been studied formally in combinatorics under the name "generating function".

http://en.wikipedia.org/wiki/Generating_function

In this case, the sequence 1, 2, 4, ..., 2^n has the generating function,

  g(z) = sum[i = 0 to inf] (2^i * z^i) 
       = 1 + 2z + 4z^2 + ... 
       = 1 / (1 - 2z)
Substituting a small number 10^-k, such as z = 0.0001 gives 10000/9998, and then right shifting by dividing 10000 leads to 1/9998.

What more interesting is that some other useful sequences can often be obtained from the function, by operations like differentiation and integration, or adding / multiplying with other functions.

For example:

  2z + (4*2)z^2 + (8*3)z^3 + (16*4)z^4 ...
  = d/dz(g(z))
  = d/dz(z * 1 / (1 - 2z))
  = 2 / (1 - 2z)^2
Put z = 1/10000 = 0.0001, this yields 50000000/24990001 = 2. 0008 0024 0064 0160 0384 ...

Re: 1/9998 = 0.0001 0002 0004 0008 0016 0032 0064 0128 0256..

#67
Since 1/9998 is a rational number, the result is a repeating decimal. The powers of 2 may sometime repeat its digits? According to according to WolframAlpha, 1/98 repeats after 42 digits. 1/998 repeats after 498 digits. And 1/9998 repeats each 357 digits.

Re: 1/9998 = 0.0001 0002 0004 0008 0016 0032 0064 0128 0256..

#68

The pattern will break down once you get past 8192, which is 2^13. That means that the pattern continues for an impressive 52 significant figures (well, it actually breaks down on the 52nd digit, which will be a 3 instead of a 2). 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 patt…

If you'd like to continue the pattern beyond 52 digits, just keep adding 9s to the original fraction... 1/9999999999998 = 1.0000000000002 0000000000004 0000000000008 0000000000016 0000000000032 0000000000064 0000000000128 0000000000256 0000000000512 0000000001024 0000000002048 0000000004096 0000000008192 0000000016384 0000000032768 0000000065536 0000000131072 00000002621440... × 10^-13

For the fibonacci, add a 9 on both sides of the denomator

1/998999 1/99989999 1/9999899999

To get more 0 spacing and avoid overflow

Re: 1/9998 = 0.0001 0002 0004 0008 0016 0032 0064 0128 0256..

#69

Here's a generalization for any arithmetic sequence. With first term a0, difference d, and digit "padding" of n, the fraction that will result is: (a0 + (d - a0)(1/10^n)) / (1 - 1/10^n)^2 For instance the sequence 1, 4, 7, 10, 13... (1 + (3 - 1)(1/10^2)) / (1 - 1/10^2) = 1.02 / 0.9801 = 3400/3267 = 1.004 007 010 013 016... For any kind of recursive sequence, you can find its generating function G(x) and then substitu…

Neat! Not familiar though with generating functions - can you pls explain how the generating function for the Fibonnaci sequence is x/(1 - x - x^2 ) ?

For Fibonacci sequence,

             x = 1x^1
      x * g(x) =        1x^2 + 1x^3 + 2x^4 + 3x^5 + 5x^6 + ...
  + x^2 * g(x) =               1x^3 + 1x^4 + 2x^5 + 3x^6 + ...
  ------------------------------------------------------------
  =       g(x) = 1x^1 + 1x^2 + 2x^3 + 3x^4 + 5x^5 + 8x^6 + ...
Hence,

     x = (1 - x - x^2) * g(x)
  g(x) = x / (1 - x - x^2)
Post reply on HN