Repetends (Repeating Decimals) Content from the guide to life, the universe and everything

Repetends (Repeating Decimals)

2 Conversations

Repetends, sometimes referred to as 'repeating decimals', are found in rational numbers which are obtained by dividing one whole number by another whole number. A repetend is a repeating series of digits found after the decimal point in such numbers.

How to Make a Repetend

  1. Choose a rational number p that has at least one prime factor other than two or five. (It can have two and/or five as prime factors, but they can't be the only ones.)

  2. Choose another rational number d that is not a multiple of p.

  3. Calculate the quotient q = d/p

  4. After you've calculated q to as many decimal places as you want, examine the numbers to the right of the decimal point. Those numbers will contain a repetend - a repeating series of digits - although the first digit of the decimal isn't necessarily the first digit of the repetend.

'But doesn’t calculating all this by hand take a long time?' you may ask. If you were to do it on paper, certainly. However, nowadays the answer is no, as there are computer programs which can do the job very easily. In fact, the algorithm included below can be made to work in almost any computer language, including BASIC, the C programming language, and a Macintosh computer scripting system called AppleScript.

Long-Division Algorithm (for Base 10) in BASIC

10 home: REM clear the screen 20 input "Dividend? ";d: REM user inputs the dividend 30 input "Divisor? ";p: REM user inputs the divisor 40 q = int(d/p): REM truncate q to an integer 50 print q;".";: REM print q, then the decimal point 60 d = 10*(d mod p): REM set d to 10 times the modulus (remainder) of d divided by p 70 q = int(d/p): REM set q to the digit right after the decimal point 80 print q;: REM print q 90 if inkey$" " then goto 60: REM press [SPACE] to interrupt 100 end: REM end the program

(Each line should start with a line-number, so lines 60, 70 and 90 should all be on one line in your program - they are only split here for display purposes.)

For example, let's say that d = 1 and p = 7: we find that q = 0.142857142857142..., ad infinitum. Verbally, one can say, 'zero point one four two eight five seven repeating' or 'zero point... seven bar,' referring to the practice of drawing a bar (or straight line) above the first occurrence of the repetend to indicate that it does indeed repeat.

In this case, the repetend is '142857', although the order may be wrapped around if d is a different number. For example, if d = 10, then q = 1.428571428571428..., whose repetend is still '142857', but can also be expressed as '428571', as the first digit of the repetend is '4'.)

Repetend Features

Simply put, if p is a multiple of seven, then q will always contain the sequence of digits '142857', no matter what, although the sequence may start from a different position, depending on the value of d.

The same concept applies for other values of p. The repetend will be the same if p is 11 or 22, because both are multiples of eleven. If p=33, however, it produces a different result, as 3 would then be a part of the equation. More information is provided below.

If you divide by a multiple of at least two different primes, other than two or five, you would obtain a completely different repetend than the one you would get were you to divide by only one of the prime factors of p.

This might make you think that dividing by the same number always produces the same repetend, but that's not true. Some numbers, such as 13, produce a couple of different repetends, depending on whether the divisor is an even number (divisible by two) or an odd number (not divisible by two). For example, if p = 13 and d is an odd number, the repetend will be '769230'. However, if d is an even number, the repetend will be '846153'.

Also, if p = 3, or a multiple thereof (nine is a good example), you can get a whole slew of different results.

Other Numerical Bases

You can find repetends in bases other than base 10, the decimal system; a strange, universal rule seems to apply, though:

The sum of the digits in any repetend is equal to some multiple of (b-1), where b is the numerical base in which you’re calculating, unless the divisor is equal to an odd multiple of (b-1), which produces different results.

Repetend Length Limits

No limits on the maximum length of repetends are known at this time, but it seems that, like numbers in general, there are no limits on size.

The Repetend '0.9 bar'

This repetend (0.99999...) is, in fact, equal to one. If it seems hard to believe, try obtaining 0.9 bar as a repetend. It's impossible, and the reason is very simple: there is no division that would produce it

Think about it: 1/9 is equal to 0.1 bar; and 2/9 is equal to twice that (0.2 bar). Therefore it follows that 0.9 bar must be 9 times 0.1 bar (or 9 times 1/9). But 9 times 1/9 is nine ninths, which is one.

Or, as an algebraic proof:

x=0.99999...
Multiply both sides by 10:
10x=9.99999...
Subtract x from both sides:
9x=9
Divide both sides by 9:
x=1
Which means (from the top equation):
1=0.99999...

Effect on Your Life

None at all... yet. But if you're interested, investigate these strange things a bit. Keep a log of interesting repetends you calculate. Maybe, one day, the research of repetends will lead to discoveries of currently unknown numerical patterns; perhaps they will even lead humankind to discover a pattern among prime numbers, which has been a lifelong dream of many mathematicians. For now, however, the concept of repetends continues to hold an interesting mix of predictability and intrigue.


Bookmark on your Personal Space


Edited Entry

A592553

Infinite Improbability Drive

Infinite Improbability Drive

Read a random Edited Entry

Categorised In:


Written by

References

h2g2 Entries

Write an Entry

"The Hitchhiker's Guide to the Galaxy is a wholly remarkable book. It has been compiled and recompiled many times and under many different editorships. It contains contributions from countless numbers of travellers and researchers."

Write an entry
Read more