# Another question about representations of rationals in base n

**URL:** <https://boards.straightdope.com/t/another-question-about-representations-of-rationals-in-base-n/124814>\
**Category:** Factual Questions\
**Created:** [August 21, 2002, 12:26am UTC](https://boards.straightdope.com/t/another-question-about-representations-of-rationals-in-base-n/124814 "2002-08-21T00:26:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [August 21, 2002, 12:26am UTC](https://boards.straightdope.com/t/another-question-about-representations-of-rationals-in-base-n/124814/1 "2002-08-21T00:26:16Z")

</div>

All right, in the same vein as this thread. Suppose that p/q does not have a terminating representation in base n. I seem to recall reading that the repeating portion of p/q must have fewer than q digits. Is this true? If so, how would I prove it? I tried using the old algorithm for converting repeating decimals into fractions, but I couldn’t get anywhere with that.

---

<div class="post-metadata">

**Author:** ![yabob](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/yabob/32/2821_2.png) [@yabob](https://boards.straightdope.com/u/yabob)\
**Post date:** [August 21, 2002, 12:39am UTC](https://boards.straightdope.com/t/another-question-about-representations-of-rationals-in-base-n/124814/2 "2002-08-21T00:39:35Z")

</div>

Think about performing long division to produce the decimal. There’s only q - 1 possible non-zero remainders. As soon as you repeat a remainder, you repeat the pattern from the last point you obtained that remainder.

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [August 21, 2002, 12:49am UTC](https://boards.straightdope.com/t/another-question-about-representations-of-rationals-in-base-n/124814/3 "2002-08-21T00:49:50Z")

</div>

:smack:
