Predicting the Period of Recurring Decimals in Rational Numbers

  • Context: Undergrad 
  • Thread starter Thread starter gmax137
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around predicting the period of recurring decimals in the decimal representation of rational numbers, specifically focusing on how to determine when a decimal representation will terminate or begin to repeat. Participants explore theoretical aspects, mathematical reasoning, and potential methods for calculating these periods.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant asks if there is a method to determine how far a decimal representation of a rational number will go before terminating or repeating, seeking a specific name for this concept.
  • Another participant references Sloane's sequence A114206 and provides a formula to express the decimal expansion of 1/n, discussing the lengths of the non-repeating and repeating parts of the decimal.
  • A different participant proposes a method involving modular arithmetic and Euler's theorem to find the period of the decimal representation, suggesting that the period is related to the order of 10 modulo m.
  • One participant points out that the previous explanation focused on the period of the recurring decimal rather than the length of the leading non-repeating part.
  • Another participant introduces the Pigeonhole principle, arguing that the decimal expansion must repeat within m digits due to the limited number of possible remainders in the long division process.

Areas of Agreement / Disagreement

Participants express differing views on the complexity of the problem and the methods to approach it. There is no consensus on a single method or understanding, as multiple perspectives and techniques are presented without resolution.

Contextual Notes

Some participants' contributions involve advanced mathematical concepts such as modular arithmetic and Euler's theorem, which may depend on specific conditions regarding the relationship between n and m. Additionally, the discussion includes references to sequences and formulas that may not be universally understood.

Who May Find This Useful

This discussion may be of interest to those studying number theory, rational numbers, or anyone curious about the properties of decimal expansions in mathematics.

gmax137
Science Advisor
Education Advisor
Messages
3,182
Reaction score
3,786
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
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:
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...
 
Count: You described the period (length) of the recurring decimal, not the length of the leading (nonperiodic) part of the decimal expansion.
 
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:
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:
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
5K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 13 ·
Replies
13
Views
9K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 13 ·
Replies
13
Views
5K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 6 ·
Replies
6
Views
9K
  • · Replies 3 ·
Replies
3
Views
2K