Sponsoring website: Emergency Boot CD



Repeating Decimals
and
Cyclic Numbers


Most of you are already familiar with the repeating decimal digits of fractions like one third (1/3) or two thirds (2/3) which have these never ending strings of threes and sixes: 1 / 3 = 0.3333333333...   and   2 / 3 = 0.6666666666...

At some point (preferably before high school), a Math teacher should have explained the convention of placing a bar over repeating decimal digits, or possibly underlining them or placing brackets around them; on this web page, for example, we'll write the repeating decimals using an underline:   1/6 = 0.1666.   For electronic text files, its acceptable to merely bracket the repeating digits; with parentheses or or literal 'brackets' such as: 1/6 = 0.166(6) or 0.166[6].

Math teachers should never allow you to simply round-off  the digits to 0.167; unless you are specifically studying some method of doing so, such as the use of Math in the sciences.

Note: In the sciences, where numbers often depend upon the accuracy of some measuring tool -- from a simple meter stick to the most advanced scientific instruments available, it's quite reasonable to agree that none of your results should ever be expressed with more digits than the number obtained from the least accurate tool used. For example, although 6.485 times 1.07 times 4.392 should be equal to 30.4758684 in a math class. In a science class, this would most likely be expressed as just 30.5; using a 'round-up' method, since the accuracy of the 1.07 measurement was only three digits.
      In a Mathematics class, however, you should never state that 1/6 = 0.167 (they are not equal). If a person feels it's necessary not to include every digit in some result (due to limitations of space to record the digits, or too little time), they should use some kind of symbol which shows the result is an approximation (and state it will be used as such at the beginning of of their paper; or at least in a footnote where it's first used). When writing, one could replace the parallel bars of an equal sign with tilde marks (~), also called a 'wavy' equal sign (≈); 2248h in Unicode (or "≈" in HTML code), or place a dot above the equal sign (); 2250h in Unicode, but not available in most fonts (we used Lucida Sans Unicode here). Or define some other way you will show an approximate value in any of your own papers.

The first non-trivial (more than a single digit) repeating decimal fraction is one seventh:

 1/7 = 0.142857142857 

Even the calculator program that came with Windows® 95 (with its 12 to 13 digit display) would give most people the idea that the same six digits might repeat an infinite number of times. But what's a person to do if the number of digits that comprise a repeating decimal fraction end up being 20, 30, 60 or even hundreds of digits?! This is why we must have some agreed upon notation for expressing approximate values of numbers that must be written with digits to the right of a decimal point. (On a web page, one might be able to use the 'Wavy equal sign' Unicode character, for example: 1/49 ≈ 0.0212766 and we read this sign as "approximately equal to," or we'll simply have to state that the value is an approximation.)



The Decimal Expansion
of All Fractions (1/d)
from 1/2 through 1/70

What we'll confirm further below (in detail) is that the digit '9' (often a string of many nines) is a key factor in understanding repeating decimal fractions: Because for many of them, the number of digits which repeat are the same as the smallest string of nines which can be divided evenly by the denominator, and that quotient will equal the repeating digit(s)! Stating this in algebraic terms: For each 1/p (where p is a prime number, but not 2 or 5), then for k = 1,2,3... n, [(10^k)-1]/p = the repeating digits for that fraction, when there is no remainder; k also indicates the number of digits that repeat. This is quite easy to show by way of example: Starting with 1/3, for k = 1: (10^1)-1=9, and 9/3 = 3. Done. The single repeating digit is 3. For 1/7, it's obvious that 9/7 has a remainder, as does 99/7 (and for k=3, 4 or 5 as well). But when we use (10^6)-1=999999, we arrive at the integer only quotient of 142857 (999999 / 7 = 142857). Unlike 1/3, the fraction 1/7 is a special case where k = p - 1, and we call the digits which repeat a cyclic number. For 1/11, k = 2, since 11 divides evenly into 99. Note: There must be two repeating digits in this case (since k=2), and they are: 09. Likewise, for 1/13, at k = 6, we find that 999999 / 13 = 76923, but there must be 6 repeating digits; they are: 076923.

A Cyclic Number is a k-digit-long integer, that when multiplied by 2, 3, 4 ... up to k will result in the same k digits in a different order.  It will also have the characteristic that multiplying those digits by k + 1 will produce a string of k nines (). Example: Multiplying 0588235294117647 (16 digits) by 16, produces: 9411764705882352; rotating through 8 digits in this case. But if we multiply this number by k + 1 = 17, the result is a string of 16 nines: 9999999999999999.

Fraction   Exact Decimal Equivalent  or  Repeating Decimal Expansion
1 / 2   0.5
1 / 3   0.333333333333333333    (Only 1 repeating digit)
1 / 4   0.25
1 / 5   0.2
1 / 6   0.166666666666666666       ( 1/2 times 1/3)
1 / 7   0.142857142857142857    (6 repeating digits)
1 / 8   0.125
1 / 9   0.111111111111111111     (1/3 times 1/3) or (1/3)^2
1 / 10   0.1
1 / 11   0.090909090909090909      (Only 2 repeating digits)
1 / 12   0.083333333333333333      [(1/2)^2 times 1/3]
1 / 13   0.076923076923076923   (Only 6 repeating digits)
1 / 14   0.07142857142857142857     ( 1/2 times 1/7)
1 / 15   0.066666666666666666       ( 1/5 times 1/3)
1 / 16   0.0625
1 / 17   0.0588235294117647   (16 digits)
1 / 18   0.055555555555555555       [ 1/2 times (1/3)^2]
1 / 19   0.052631578947368421   (18 digits)
1 / 20   0.05
1 / 21   0.047619047619047619     (1/3 times 1/7)
1 / 22   0.0454545454545454545     (1/2 times 1/11)
1 / 23   0.0434782608695652173913   (22 digits)
1 / 24   0.041666666666666666      [(1/2)^3 times 1/3]
1 / 25   0.04
1 / 26   0.0384615384615384615     ( 1/2 times 1/13)
1 / 27   0.037037037037037037     [ (1/3)^3 ]; (3 digits)
1 / 28   0.03571428571428571428    [(1/2)^2 times 1/7]
1 / 29   0.0344827586206896551724137931  (28 digits)
1 / 30   0.033333333333333333      (1/2 * 1/5 times 1/3)
1 / 31   0.032258064516129032258064516129 (Only 15 digits)
1 / 32   0.03125
1 / 33   0.030303030303030303      (1/3 times 1/11)
1 / 34   0.02941176470588235     ( 1/2 times 1/17 )
1 / 35   0.0285714285714285714     ( 1/5 times 1/7)
1 / 36   0.027777777777777777      [(1/2)^2 times (1/3)^2]
1 / 37   0.027027027027027027    (Only 3 repeating digits)
1 / 38   0.0263157894736842105     (1/2 times 1/19)
1 / 39   0.025641025641025641       (1/3 times 1/13)
1 / 40   0.025
1 / 41   0.024390243902439      (Only 5 repeating digits)
1 / 42   0.0238095238095238095     ( 1/6 times 1/7)
1 / 43   0.023255813953488372093   (Only 21 digits)
1 / 44   0.022727272727272727      [(1/2)^2 times 1/11]
1 / 45   0.022222222222222222      [1/5 times (1/3)^2]
1 / 46   0.02173913043478260869565      (1/2 times 1/23)
1 / 47   0.0212765957446808510638297872340425531914893617
                             (46 digits)
1 / 48   0.020833333333333333      [(1/2)^4 times 1/3]
1 / 49

  0.020408163265306122448979591836734693877551
Odd: 42 digits
 instead of only 6.     (1/7 times 1/7)
Reason: 999999 is not evenly divisible by 49,
but (10^42 - 1) is!
(See "Observations..." section below.)

  At first glance, this curious fraction produces some unexpected digits:
02, 04, 08, 16, 32 ... but breaks at 653 (no 64); yet picks up
again with: 06, 12, 24, 48 ... breaks again with 9795 (instead
of 96)... only to see 9, 18 and 36 follow, but then a 73 (not a 72). A
visitor to this page pointed out how this is easily explained as the result
of summing various fractions together:

0.02
0.0004
0.000008
0.00000016
0.0000000032
0.000000000064
0.00000000000128
0.0000000000000256
0.000000000000000512
0.00000000000000001024
----------------------
0.02040816326530612224

In this manner, our curious fraction can be thought of as the sum of successive
powers of 0.02:
 1/49
= Infinite sum of [ 1/50 + 1/(50^2) + 1/(50^3) + 1/(50^4) + 1/(50^5) . . . ]

In order to reach the point where our results start to repeat only the first two
digits (02), we have to carry out the summation to the inverse of the 26th
power of 50; which gives us the following sum:
0.0204081632653061224489795918367346938775510202712064.

1 / 50   0.02
1 / 51   0.01960784313725490196078431372549 (1/3 times 1/17)
1 / 52   0.01923076923076923076      [(1/2)^2 times 1/13]
1 / 53   0.01886792452830188679245283   (Only 13 digits)
1 / 54   0.0185185185185185185      [ 1/2 times (1/3)^3]
1 / 55   0.0181818181818181818       ( 1/5 times 1/11)
1 / 56   0.017857142857142857142      [(1/2)^3 times 1/7]
1 / 57   0.017543859649122807017543859649122807 (1/3 times 1/19)
1 / 58   0.01724137931034482758620689655     (1/2 times 1/29)
1 / 59   0.0169491525423728813559322033898305084745762711864406779661
    (58 digits)
1 / 60   0.016666666666666666    [(1/2)^2 * 1/5 times 1/3]
1 / 61   0.016393442622950819672131147540983606557377049180327868852459
    (60 digits)
1 / 62   0.0161290322580645161290322580645   ( 1/2 times 1/31)
1 / 63   0.015873015873015873         [(1/3)^2 times 1/7]
1 / 64   0.015625
1 / 65   0.0153846153846153846      ( 1/5 times 1/13)
1 / 66   0.0151515151515151515      ( 1/2 * 1/3 times 1/11)
1 / 67   0.014925373134328358208955223880597
                            (Only 33 digits)
1 / 68   0.0147058823529411764705882352941176
                            [(1/2)^2 times 1/17]
1 / 69   0.0144927536231884057971   ( 1/3 times 1/23 )
1 / 70   0.0142857142857142857      ( 1/2 * 1/5 times 1/7)
I decided to add the following for some curious minds:
1 / 81   0.012345679012345679   [ (1/9)^2 or: (1/3)^4 ]  (Only 9 repeating digits) (Note: "8" is missing.)
1 / 9801   [ (1/99)^2] All 2-digit numbers from  00 through  99 repeat! (Except:  "98" is missing.)
1/998001   [(1/999)^2] All 3-digit numbers from 000 through 998 repeat! (Except: "998" is missing.)

Here's a fun online calculator: https://mathsisfun.com/calculator-precision.html which you can set to 3000 decimal places, then enter 1/998001 to see that every 3-digit number (except "998") will appear!

 

General Rule of Exact Decimal Equivalents

Observations on Repeating Decimals

Here's a table of the first eleven cyclic numbers:

PrimeCyclic Number
 7142857
 170588235294117647
 19052631578947368421
 230434782608695652173913
 290344827586206896551724137931
 470212765957446808510638297872340425531914893617
 590169491525423728813559322033898305084745762711864406779661
 61016393442622950819672131147540983606557377049180327868852459
 97010309278350515463917525773195876288659793814432989690721649484536082474226804123711340206185567
 109009174311926605504587155963302752293577981651376146788990825688073394495412844036697247706422018348623853211
 1130088495575221238938053097345132743362831858407079646017699115044247787610619469026548672566371681415929203539823

 

Examples of the Rotating Digits of Cyclic Numbers

The second and third Cyclic Numbers:

0588235294117647 (16 digits; see 1/17 in our "Decimal Equivalents Table" above)
052631578947368421 (18 digits; see 1/19 in our "Decimal Equivalents Table" above)

Cyclic
       Number:
0588235294117647
052631578947368421
x 2 = 
1176470588235294
105263157894736842
x 3 = 
1764705882352941
157894736842105263
x 4 = 
2352941176470588
210526315789473684
x 5 = 
2941176470588235
263157894736842105
x 6 = 
3529411764705882
315789473684210526
x 7 = 
4117647058823529
368421052631578947
x 8 = 
4705882352941176
421052631578947368
x 9 = 
5294117647058823
473684210526315789
x 10 = 
5882352941176470
526315789473684210
x 11 = 
6470588235294117
578947368421052631
x 12 = 
7058823529411764
631578947368421052
x 13 = 
7647058823529411
684210526315789473
x 14 = 
8235294117647058
736842105263157894
x 15 = 
8823529411764705
789473684210526315
x 16 = 
9411764705882352
842105263157894736
x 17 = 
9999999999999999
894736842105263157
x 18 = 
 
947368421052631578
x 19 = 
 
999999999999999999

So, few people ever study more than the first cyclic number of 142857.

This number, 142857, is the first and most famous of the cyclic numbers, since it's easily memorized (being comprised of only 6 digits) and has no troublesome leading zero; giving us this simple rotation pattern:

Cyclic Number:
142857
Shift
x 2 =
285714
- 2
x 3 =
428571
- 1
x 4 =
571428
+ 2
x 5 =
714285
+ 1
x 6 =
857142
+/- 3
x 7 =
999999
N/A

Multiplying 142857 by 8, 9, etc., leads to some interesting results as well:

x 8 =
1142856
6 + 1 = 7; so pattern is still like 14285(7).
x 9 =
1285713
3 + 1 = 4; so pattern is still like 28571(4).
x 10 =
1428570
0 + 1 = 1; so pattern is like our 42857(1).
x 11 =
1571427
7 + 1 = 8; so pattern is still like 57142(8).
x 12 =
1714284
4 + 1 = 5; so pattern is still like 71428(5).
x 13 =
1857141
1 + 1 = 2; so pattern is still like 85714(2).
x 14 =
1999998
8 + 1 = 9; obviously like the 999999 above.
x 15 =
2142855
5 + 2 = 7; so pattern is still like 14285(7).
x 16 =
2285712
2 + 2 = 4; so pattern is still like 28571(4).
x 17 =
2428569
This seems to be a problem at first! But we
can still find some order here and arrive at
a familiar pattern similar to 142857, by first
postulating that the 9 + 2 = 11; which is then
separated into two ones, as: 1 and then
6 + 1 = 7; so giving us: (1)4285(7). Some
number theorists might enjoy seeing this?!
x 18 =
2571426
6 + 2 = 8; so pattern is still like 57142(8).
x 19 =
2714283
3 + 2 = 5; so pattern is still like 71428(5).
x 20 =
2857140
0 + 2 = 2; so pattern is still like 85714(2).
x 21 =
2999997
7 + 2 = 9; obviously like the 999999 above.
x 22 =
3142854
4 + 3 = 7; so pattern is still like 14285(7).

Hmm... how far can we extend this? Well, each time we hit a multiple of 7 (14, 21, 28, etc.), we should get something like '999999', but let's check that multiple + 1 (or  29, 36, 43, etc.) for the same patterns we observed above (in rows x 8, x 15 and x 22):

4142853 [x 29; nothing new here; 3 + 4 = 7; so still like 14285(7).]
5142852 [x 36; nothing new here; 2 + 5 = 7; so still like 14285(7).]
6142851 [x 43; nothing new here; 1 + 6 = 7; so still like 14285(7).]
7142850 [x 50; nothing new here; 0 + 7 = 7; so still like 14285(7).]
8142849 [x 57; now we must change 9 + 8 = 17 into a 1 and a 7 to give us: 1428(4+1=5)(7).]
9142848 [x 64; again, this requires 8 + 9 = 17 to be a 1 and a 7 to give us: 1428(4+1=5)(7).].]

We can also see that a definite pattern has emerged in the multiples themselves: Note the sequentially increasing and decreasing digits at both the beginning and end of each new multiple! This is true for every 7th multiple you compare. When we multiply 142857 by 71, we get: 10142847 which does resemble our pattern once we steal a 1 from the '7' to arrive at 1428(4+1=5)(6+1+0=7). Is there a multiplier that produces a result so different, that our original cyclic number is completely lost in the digital fuzz? Let's try 7 to the 4th, 5th and 6th powers, plus 1, as multipliers:

343142514 [x (7^4)+1 = 2,402; maybe "142" is part of the original, but it's quite fuzzy. However, I can still use my intuition(?) and imagine that '5' + '1' + 2 (of the '4') = 8, leaving 2 + '3' = 5 and 4 + 3 = 7 for 142(8)(5)(7).]
2401140456 [x (7^5)+1 = 16,808; here we can only guess "14" is what's left of our original pattern! I'm not even going to bother imagining how to get back to it from here!]
16807126050 [x (7^6)+1 = 117,650; I think that's sufficiently fuzzy! And using (7^7)+1, gives us a result of: 117648882351 in which it's impossible to even guess at the starting '1' for our original pattern.].

 

Further Reading

Cyclic Numbers

Recurring (or Repeating) Decimals

Footnotes

1[Return to Text]  But what about 1/21 (and its repeating group of 047619)? Doesn't the theorem fail here (since 047 + 619 = 666)? No, because 21 is not a prime number! Its factors are 3 and 7. Curiously though, 04 + 76 + 19 = 99, and in more recent extensions of Midy's Theorem, it was generalized to include any repeating decimals of the form 1/d by splitting the period into a number of appropriate pieces. See this reference for more about Midy's Theorem.

2[Return to Text] Artin's Constant equals the Product (from k=1 to Infinity) of:  1-(1/(pk(pk-1)) where pk is the kth prime number (2, 3, 5, 7, 11... , for k=1,2,3,4,5...). The expression could also be written as  1-(1/(pk2-pk)), since n(n-1) = n2-n. For k = 1 through 6, the Product of these terms converges rather quickly: A1=0.5, A2=0.41666 (1/2 * 5/6), A3=0.3958333 (A2*19/20), A4=0.38640873015873 (A3*41/42), A5=0.38289592352092352 (A4*109/110), A6=0.3804414624727124727 (A5*155/156). Then at k = 7, the convergence noticeably slows down more and more as it approaches Artin's Constant: A7=(A6*271/272); approx. 0.37904, A8=(A7*341/342); approx. 0.3779, A9=(A8*505/506); approx. 0.3772, A10=(A9*811/812); approx. 0.3767, A11=(A10*929/930); approx. 0.3763, A12=(A11*1331/1332); approx. 0.3760, A13=(A12*1639/1640); approx. 0.3758, A14=(A13*1805/1806); approx. 0.3756, A15=(A14*2161/2162); approx. 0.3754 and A16=(A15*2755/2756); approx. 0.3753. It takes k = 200, for the Product to reach approx. 0.373993.  For further references, see: Wolfram's MathWorld and Wikipedia.


Here's a free Windows Calculator that can compute (and copy into the clipboard buffer) as many as 10,000 decimal places! It defaults to 500 digits which should be quite sufficient for any repeating decimals you'll ever study!
Take this offsite link: https://www.softlookup.com/display.asp?id=15812 to get a copy of the
MIRACL Calc multi-precision calculator by Geoff Wilkins.

NOTE: Do not trust at least the last 5 to 10 digits of the number Pi (3.14159265...) from this calculator nor possibly any other value you calculate with it. It's always a good idea to carry out a calculation to many digits beyond what you'll actually use, since the digits at the end may be incorrect! And because it produces 500 to 10,000 digits (depending on how you set it up), you can easily afford to forget about the last 10 or so digits!


Previous Updates: October 6, 2007 (2007.10.06); January 24, 2010 (2010.01.24); October 12, 2012 (2012.10.12)
Revised: October 8, 2012 (2012.10.08)
Updated: January 13, 2020 (2020.01.13)

The Starman's Math Index