Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

What's the largest possible repeating decimal that can be created from a fraction if:

  • The numerator has to be less than or equal to 9,999
  • The denominator has be less than or equal to 9,999?

I know the repeating decimal part can't exceed the denominator - 1. So the longest possible repeating decimal part has to be 9,998 or less.

The reason I want to know is to test an algorithm that I wrote which accepts fractions with numerators and denominators up to 9,999. The largest repeating decimal part I was able to create so far was 1/97 which equaled 0.[01030927 83505154 63917525 77319587 62886597 93814432 98969072 16494845 36082474 22680412 37113402 06185567] (96 repeating digits).

share|improve this question
    
Could you explain what you mean by the largest possible repeating decimal? Because all fractions will produce a repeating decimal and the largest would therefore be 9999/1 = 9999. Do you mean the longest period of repetition? –  Sam DeHority Jan 27 '13 at 1:28
    
I mean the longest period of repetition. For 1/97 I get 96 repeating digits. –  user1822824 Jan 27 '13 at 1:30
    
I'm looking for a fraction that will create a period of repetition of 9,998 repeating digits? –  user1822824 Jan 27 '13 at 1:32
    
If you want a fraction with a period of exactly $9998$, then you need to find a denominator which divides $10^{9998}-1$ and doesn't divide $10^r-1$ for any $r$, $1\le r\le9997$. Theory guarantees there are some, but they may have hundreds or thousands of digits. –  Gerry Myerson Jan 27 '13 at 3:49
add comment

2 Answers

up vote 3 down vote accepted

The numerator doesn't matter (for this question), so you might as well let it be $1$. The denominator should be the largest prime under $10000$ which has $10$ as a primitive root. I don't know offhand what that prime is, but I'm sure such primes are tabulated and shouldn't be hard to locate.

The table at the Online Encyclopedia doesn't go far enough. There is an applet which claims to find these primes, but I couldn't make it work --- maybe you'll have better luck.

share|improve this answer
    
I just did 1/9973 and got 0.[00010027073097362879775393562619071493031184197332798556101473979745312343326‌​982853705003509475584077007921387746916675022560914469066479494635515892910859320‌​164443998796751228316454426952772485711420836257896320064173267823122430562518800‌​762057555399578862929910759049433470369998997292690263712022460643738092850696881‌​580266720144389852602025468765667301714629499649052441592299207861225308332497743‌​908553093352050536448410708914067983555600120324877168354557304722751428857916374‌​210367993582673217687756943748119923794244460042113707008924095056652963] --- 554 repeati –  user1822824 Jan 27 '13 at 1:38
    
I found this list of primes... primes.utm.edu/lists/small/10000.txt –  user1822824 Jan 27 '13 at 1:39
5  
1/9967 would be the largest, producing a period of 9966. –  Sam DeHority Jan 27 '13 at 1:43
    
@DoctorBatmanGod: Please don't make edits that change the meaning of the post, unless it is marked Community Wiki. –  Rahul Jan 27 '13 at 1:52
add comment

1/9801= 0.010203040506070809010111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697990010203..., about 100 repeating digits

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.