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.

Exactly. There’s another observation that did not make the post: if a function f is represented by a power series with bounded integer coefficients, then f can be determined by evaluating it

at a single point. Indeed, define g(x)=f(x)+M/(1-x) where M is a sufficiently large integer so that the coefficients of g are positive. Then evaluate where d is sufficiently large so there’s no rolling over, and read off the coefficients.Oh, and another illustration of the 1st claim would be the abc conjecture and FLT: both are easier for polynomials.

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-

You are right: has the period that ends with 997998999, going back to 000001002003…

That said, part of what made 1/998001 interesting is that a 6-digit input (denominator) produces a nearly perfect 3000-digit output. After correction, one gets an absolutely perfect 3000-digit output, but from a fraction with over 3000 digits in the denominator.

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.

how do get a generating function for even numbers up to 100

Sounds like a question for Math.StackExchange… Take a generating function for 1,2,3,4,5, … and multiply it by 2.

Now why did we deriviate to get a generating Function for 1/998001

We know a formula for and want a formula for . How to create this coefficient ? Taking the derivative, of course: . Then multiply by to restore the exponent to .

There is an approach without derivative, but it requires an algebraic trick. Observe that is equal to the double series . Use the geometric series formula on the inner sum to get , and then use the formula again to get .

What is the geometric series formula

See Wikipedia: http://en.wikipedia.org/wiki/Geometric_series