In 1/6=1.6666..., repeating 6 is called repeatend ( or reptend ) . I learn from https://en.wikipedia.org/wiki/Repeating_decimal, the reptend in the decimal form of 1/97 is a 96-digit string. Find fraction(s) having longer reptend string(s)?

1 Answer
Oct 16, 2016

We can find the fraction for an arbitrary repeating string with the following method:

Let x = 0.bar(a_1a_2...a_n), where bar(a_1a_2...a_n) denotes the repeating n-digit string a_1a_2...a_n.

=> 10^nx = a_1a_2...a_n.bar(a_1a_2...a_n)

=> 10^nx - x = a_1a_2...a_n.bar(a_1a_2...a_n)-0.bar(a_1a_2...a_n)

=> (10^n-1)x = a_1a_2...a_n

:. x = (a_1a_2...a_n)/(10^n-1)

So, for example, if we wanted a 1000-digit repeating string, we could let a_1 = a_2 = ... = a_999 = 0 and a_1000 = 1, and then we would have

(000...01)/(10^1000-1) = 1/(10^1000-1)

give a repeating sequence of 999 zeros followed by a 1. Note that this method works to generate any repeating sequence.

If we let a_i represent the i^"th" digit of pi, then

(a_1a_2...a_10000)/(10^10000-1)

would generate a a repeating string of the first 10000 digits of pi.


We can also use a similar method to find the fraction for any rational value with a repeating string.

Given a general real number with a repeating string

c_1c_2...c_j.b_1b_2...b_kbar(a_1a_2...a_n) , a_i, b_i, c_i in {0, 1, 2, ..., 9}.

let
a = a_1a_2...a_n
b = b_1b_2...b_k
c = c_1c_2...c_j

Note that by the above work, we have 0.bar(a) = (a_1a_2...a_n)/(10^n-1)

Then we can rewrite our number as

c_1c_2...c_j.b_1b_2...b_kbar(a_1a_2...a_n) = c+10^(-k)b+10^(-k)*0.bar(a)

=c+b/10^k+a/(10^k(10^n-1))

=((10^kc+b)(10^n-1)+a)/(10^k(10^n-1))