Predicting the Period of Recurring Decimals in Rational Numbers

  • Thread starter gmax137
  • Start date
In summary, when dividing a rational number by a rational number, if the division results in a repeating decimal expansion, then the length of the repeating decimal expansion is the same as the length of the numerator divided by the length of the denominator.
  • #1
gmax137
Science Advisor
Education Advisor
3,003
3,291
Hey I'm pretty new here, this is a cool site. Sorry if this has been asked before.

When I carry out a division to get the decimal representation of a rational number n/m, is there a way to figure out how far out it will go before the representation terminates in zeros or before it starts to repeat? Is there a name for this?
 
Physics news on Phys.org
  • #2
gmax137 said:
When I carry out a division to get the decimal representation of a rational number n/m, is there a way to figure out how far out it will go before the representation terminates in zeros or before it starts to repeat? Is there a name for this?
Sloane's sequence A114206, which is related to http://www.research.att.com/~njas/sequences/A114205"
Write decimal expansion of 1/n as 0.PPP...PQQQ..., where QQQ... is the cyclic part. If the expansion does not terminate, any leading 0's in QQQ... are regarded as being at the end of the PPP...P part. Sequence gives PPP...P, right justified, with leading zeros omitted.

Comment: b(n) = A114206(n) gives the length of P (including leading zeros), c(n) = A036275(n) gives the smallest cycle in QQQ... (including terminating zeros), and d(n) = A051626(n) gives the length of that cycle.
Thus 1/n = 10^(-b(n)) * ( a(n) + c(n)/(10^d(n) - 1) ). When c(n)=d(n)=0, the fraction c(n)/(10^d(n) - 1), which is 0/0, evaluates (by definition) to 0.​

Link to http://www.research.att.com/~njas/sequences/A114206" .
 
Last edited by a moderator:
  • #3
gmax137 said:
Hey I'm pretty new here, this is a cool site. Sorry if this has been asked before.

When I carry out a division to get the decimal representation of a rational number n/m, is there a way to figure out how far out it will go before the representation terminates in zeros or before it starts to repeat? Is there a name for this?


Suppose n/m has a decimal representation that repeats itself with a period of q. If n/m > 1/10, then multiplying n/m by 10^p, would shift the decilas p laces and after the decmal place all the numbers would be the same. so, the factional part of n/m and the fractional pat of 10^p n/m are the same. So, this means that if you divide n by m then the remainder will be the same as when you divide 10^p n by m:

n Mod m = n 10^p Mod m

If n and m are relatively prime you can divie both sides by n:

10^p Mod m = 1

If 10 is relatively prime to m, then Euler's theorem says that we always have:

10^(phi(m)) Mod m = 1

where phi(m) is the number of integers smaller than m that are relatively prime to m, which can be computed from:

phi(m) = m product over all primes q that divide m of (1-1/q)

p is the smallest number to which you have to raise 10 to get 1. This is called the order of 10. It then follows that p divides phi(m). (if not then you can construct a smaller number p' such that 10^p' Mod m = 1).

If m is prime number than phi(m) = m-1. So, e.g. phi(7) = 6. So, the period of 1/7 must be a divisor of 6. It is in fact 6: 1/7 = 0.1428571428...
 
  • #4
Count: You described the period (length) of the recurring decimal, not the length of the leading (nonperiodic) part of the decimal expansion.
 
  • #5
Does it have to be so complicated? Apply the http://en.wikipedia.org/wiki/Pigeonhole_principle" . The decimal expansion of [itex] \frac n m [/itex] must repeat within m digits.

The denominator determines the possible number of remainders available in the long division process. Once you have either cycled through all of the possible remainders or repeat a remainder the decimal expansion must repeat.
 
Last edited by a moderator:
  • #6
D H said:
Count: You described the period (length) of the recurring decimal, not the length of the leading (nonperiodic) part of the decimal expansion.

I see! I didn't read the question well. :smile:
 

FAQ: Predicting the Period of Recurring Decimals in Rational Numbers

How long does it take for digits to repeat in a sequence?

In a sequence of numbers, the digits will repeat after a certain number of terms. This number is known as the period of the sequence.

What determines the length of the period in a sequence?

The length of the period in a sequence is determined by the numbers in the sequence and their arrangement. Some sequences may have a short period, while others may have a very long period or no period at all.

Can the period of a sequence be predicted?

It is not always possible to predict the length of the period in a sequence. Some patterns may emerge that can help determine the period, but for more complex sequences, it may be difficult or even impossible to predict.

How can the period of a sequence be calculated?

The period of a sequence can be calculated by observing the pattern and counting the number of terms before the pattern repeats. Alternatively, mathematical formulas can be used to calculate the period for certain types of sequences.

Is the period of a sequence always the same?

No, the period of a sequence can vary depending on the starting number and the rule or pattern used to generate the sequence. It is possible for the period to change or for a sequence to have multiple periods within it.

Similar threads

Replies
1
Views
4K
Replies
5
Views
4K
Replies
3
Views
2K
Replies
1
Views
1K
Replies
13
Views
5K
Replies
2
Views
2K
Replies
2
Views
5K
Replies
6
Views
9K
Back
Top