Abakcus
← All articles

Number Theory · Decimals · Curiosities

1/998001: The Fraction That Lists Every Number but 998

Divide 1 by 998001 and every three-digit number from 000 to 999 falls out after the decimal point in order, all except one.

A row of number tiles reading 995, 996, 997, an empty dashed slot, 999 and 000, with a red 998 tile falling out of the gap.
The fraction that skips 998.

Type 1 ÷ 998001 into a calculator and something like 0.000001002 shows up, and since the screen ends there you don't think twice about it. Keep the division going, though, and the digits after the decimal point start counting in threes, 000, 001, 002, 003, and the counting runs all the way to 997 without a single mistake. After 997, where 998 should come, 999 comes instead, then 000, and the list starts over.

To me the most interesting part of the table isn't the counting, it's that small stumble after 997. A flawless list of a thousand numbers would only have surprised people, a list that slips in exactly one place gives away how it was made.

Below is the full period of the fraction. Once the 2997 digits after the decimal point, 999 three-digit blocks, run out, the list repeats exactly. Type a three-digit number into the box and its place in the list lights up in red, and the thin red line between 997 and 999 is where 998 should have been.

Try 457, or 998.

1/998001 = 0.000001002003004005006007008009010011012013014015016017018019020021022023024025026027028029030031032033034035036037038039040041042043044045046047048049050051052053054055056057058059060061062063064065066067068069070071072073074075076077078079080081082083084085086087088089090091092093094095096097098099100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997999 ...

Why it counts

The key is the denominator. 998001 is actually 999 squared, and the decimal expansion of 1/999 is about as plain as it gets.

1/999 = 0.001 001 001 001 001 001 …

Multiply 999 by 0.001001001… and you get 0.999999…, which equals 1. So 1/998001 is that number divided by 999 once more, in other words 0.001001001… multiplied by itself.

Expand that product and you are stacking copies of 0.001001001… shifted three, six, nine, twelve places to the right and adding them up. Each copy starts one block later than the one before, so the further right you go the more copies pile into each column, and the sum comes out 001 in the second block, 002 in the third, 003 in the fourth.

shifted three places0.000001001001001001001…
six places0.000000001001001001001…
nine places0.000000000001001001001…
twelve places0.000000000000001001001…
fifteen places0.000000000000000001001…
and so on⋮⋮
sum0.000001002003004005006…
Every row is the same 0.001001001…, just starting one block further right. A column's sum counts how many rows have reached it.

If you'd rather say it with algebra, putting 0.001 in for x in 1/(1−x)² = 1 + 2x + 3x² + 4x³ + … is enough. As the coefficients grow 1, 2, 3, 4, each power of x pushes them three more places to the right and the numbers settle into their blocks one by one.

What happens to 998

This works perfectly up to 999, because every number up to 999 fits in its three-digit box. Then it's 1000's turn, and a four-digit number doesn't fit in a three-digit box. The leading 1 spills into the box on the left, turns the 999 sitting there into 1000, and that spills too, adding one to 998's box. So 998 becomes 999 and drops out of the list.

Every number after 1000 also leaves its leading 1 in the box to its left, so 999's box reads 000, 1000's box reads 001, 1001's box reads 002. The list wraps around one box early and the period closes at 999 blocks instead of 1000.

The moment four-digit numbers start going into three-digit boxes, the overflow passes to the neighbour on the left. The only number lost is 998, because the carry runs through the nines and stops at the first box that isn't a nine.

The same family

The pattern isn't tied to three digits. When the denominator is 9801, 99 squared, the fraction counts the two-digit numbers from 00 to 97 and skips 98, and 99980001, 9999 squared, counts the four-digit numbers and skips 9998. The shortest one is 81, 9 squared. 1/81 = 0.012345679… counts the single digits and skips 8.

It isn't tied to base ten either, whatever base you're in, dividing 1 by the square of the base minus one gives you that base's digits in order, and again the second-to-last digit gets skipped. In base sixteen, dividing 1 by 15 squared, 225, gives 0123456789ABCDF, and this time it's E that drops out.

You can see all four below. Each button redoes the division in your browser and shows one complete period. The box opens at the very end, where the skip is, and scrolling up takes you back to the start of the list.

Period of 2,997 digits, 999 blocks. Missing 998. Grey blocks are the start of the second round.

1/998001 = 0.000001002003004005006007008009010011012013014015016017018019020021022023024025026027028029030031032033034035036037038039040041042043044045046047048049050051052053054055056057058059060061062063064065066067068069070071072073074075076077078079080081082083084085086087088089090091092093094095096097098099100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997999000001002003004005…

Fractions that count other things

Change the denominator a little and the fraction writes other sequences. 1/998999 lays out the Fibonacci sequenceafter the decimal point, 000, 001, 001, 002, 003, 005, 008, 013, 021. But the same carry breaks this one too. After 610, where 987 should come, 988 comes instead, because 1597 and everything after it don't fit in their three-digit boxes and the spilled digits flow left.

Reduce the fraction that writes all thousand blocks from 000 to 999 in order, 998 included, and its denominator comes out 2998 digits long. 998001 writes the same list with a six-digit denominator and gives up a single number in exchange.