Repeating Decimal

DOWNLOAD Mathematica Notebook

A repeating decimal, also called a recurring decimal, is a number whose decimal representation eventually becomes periodic (i.e., the same sequence of digits repeats indefinitely). The repeating portion of a decimal expansion is conventionally denoted with a vinculum so, for example,

 1/3=0.3333333...=0.3^_.

The minimum number of digits that repeats in such a number is known as the decimal period.

Repeating decimal notation was implemented in versions of the Wolfram Language prior to 6 as PeriodicForm[RealDigits[r]] after loading the add-on package NumberTheory`ContinuedFractions`.

All rational numbers have either finite decimal expansions (i.e., are regular numbers; e.g., 1/2=0.5) or repeating decimals (e.g., 1/11=0.09^_). However, irrational numbers, such as pi=3.141592... neither terminate nor become periodic.

Numbers such as 0.5 are sometimes regarded as repeating decimals since 0.5=0.50^_=0.49^_.

The denominators of the first few unit fractions having repeating decimals are 3, 6, 7, 9, 11, 12, 13, 14, 15, 17, 18, 19, 21, 22, 23, 24, 26, 27, 28, 29, ... (OEIS A085837).

The repeating portion of a rational number can be found in the Wolfram Language using the command RealDigits[r][[1,-1]]. The number of digits in the repeating portion of the decimal expansion of a rational number can also be found directly from the multiplicative order of its denominator. The periods of the decimal expansions of 1/n for n=1, 2, ... are 0, 0, 1, 0, 0, 1, 6, 0, 1, 0, 2, 1, 6, 6, 1, 0, 16, 1, 18, ... (OEIS A051626), where 0 indicates that the number is regular.

If 1/m is a repeating decimal and 1/n is a terminating decimal, them 1/(mn) has a nonperiodic part whose length is that of 1/n and a repeating part whose length is that of 1/m (Wells 1986, p. 60).

Wolfram Web Resources

Mathematica »

The #1 tool for creating Demonstrations and anything technical.

Wolfram|Alpha »

Explore anything with the first computational knowledge engine.

Wolfram Demonstrations Project »

Explore thousands of free applications across science, mathematics, engineering, technology, business, art, finance, social sciences, and more.

Computerbasedmath.org »

Join the initiative for modernizing math education.

Online Integral Calculator »

Solve integrals with Wolfram|Alpha.

Step-by-step Solutions »

Walk through homework problems step-by-step from beginning to end. Hints help you try the next step on your own.

Wolfram Problem Generator »

Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet.

Wolfram Education Portal »

Collection of teaching and learning tools built by Wolfram education experts: dynamic textbook, lesson plans, widgets, interactive Demonstrations, and more.

Wolfram Language »

Knowledge-based programming for everyone.