Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Arbitrary cycle of digits in rational number?

  1. Dec 9, 2009 #1
    Hello all, I have recently been wondering whether there is a way to determine a fraction for which the decimal expansion is a cycle of n numbers?

    I would like to be able to work this out myself, but I can't wait until I start my mathematics degree. So any help would be greatly appreciated.

    For example, if I wanted a rational number with a repeated 500 digit sequence, is there a way to efficiently work out an example of such a number?

    Penny for your thoughts guys.

  2. jcsd
  3. Dec 9, 2009 #2
    If n is a primitive root of 10 then the cycle of 1/n is n-1 digits long.

    For example 1/7=.142857142857... has 6 repeating digits.
  4. Dec 9, 2009 #3
    Start with a repeating decimal like, for example, 0.123412341234... Try multiplying it by an appropriate power of ten, and then subtracting the original number.

    In this example you started with a repeating decimal; try to run the exercise backwards, to see if you can end up obtaining a repeating decimal.
  5. Dec 9, 2009 #4
    Ah thanks guys, I feel stupid for having to ask now :).
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook