A post in response to Colin’s “Patterns in numbers”:

1/998001 = 0.000 001 002 003 004 005 006 007…

goes through all integers 000 through 999, skipping only 998. Maple confirms this:

This fraction made rounds on the internet a while ago.

I begin with two general claims:

- Integer numbers are more complicated than polynomials
- Decimal fractions are more complicated than power series

To illustrate the first one: multiplying 748 by 367 takes more effort than multiplying the corresponding polynomials,

The reason is that there’s no way for the product of and to “roll over” into . It’s going to stay in the group. Mathematically speaking, polynomials form a graded ring and integers don’t. At the same time, one can recover the integers from polynomials by setting in . The result is .

Moving on to the second claim, consider the power series

I prefer to use instead of here, because we often want to replace with an expression in . For example, setting gives us

which is nothing surprising. But if we now set (and, for neatness, divide both sides by 1000), the result is

which looks like a magical fraction producing powers of 2. But in reality, setting did nothing but mess things up. Now we have a complicated decimal number, in which powers of 2 break down starting with “513” because of the extra digits rolled over from 1024. In contrast, the neat power series keeps generating powers of 2 forever.

By the way, is the *generating function* for the numbers 1,2,4,8,16…, i.e., the powers of 2.

So, if you want to cook up a ‘magical’ fraction, all you need to do is find the generating function for the numbers you want, and set the variable to be some negative power of 10. E.g., the choice avoids digits rolling over until the desired numbers reach 1000. But we could take and get many more numbers at the cost of a more complicated fraction.

For example, how would one come up with 1/998001? We need a generating function for 1,2,3,4,…, that is, we need a formula for the power series . No big deal: just take the derivative of (*):

and multiply both sides by to restore the exponent:

Now set , which is easiest if you expand the denominator as and multiply both the numerator and denominator by . The result is

Dropping 1000 in the numerator is a matter of taste (cf. xkcd 163).

Let’s cook up something else. For example, again take the derivative in (**) and multiply by :

Now set to get

Admittedly, this fraction is less likely to propagate around the web than 1/998001.

For the last example, take the Fibonacci numbers 1,1,2,3,5,8,13,… The recurrence relation can be used to find the generating function, . Setting yields

Fantastic explanation. So I guess the answer to the question “why was 998 skipped?” is really that it was not, but there was a domino effect with one of the digits from 1000 “rolling over” onto the 999, which picked up an extra digit and “rolled over” to 998, making it look like 999.

It is easy to remove the domino effects of 1/998001. Notice we want to subtract , , and so on. Upon simplification this becomes . Exchanging derivative and limit, we have the result as exactly . So the “ideal” faction should be 1/998001-

As another remark we should not pre-assume M and d discussed in the reply of the first comment; we have no idea of the magnitude of the coefficients of the power series. Thus additional computations should be used to determine M and d first.