Thinking more about this, it occurs to me that a rational number expressed as a fraction having arbitrarily long numerator and denominator that differ by 1 can have an astronomically long sequence of repeating digits in the decimal representation.
You might find useful this reference (also the other subheadings)
Wikipedia - Repeating decimal - subheading Other properties of repetend lengths
You might also like to think backwards; given any positive decimal expansion with a repetend, we can find unique positive integers p,q such that gcd(p,q)=1 and p/q has the given value.
Hello, StevenBrown!
You discovered this on your own? . . . Good for you!
Keep exploring . . . there's some fascinating stuff out there!
I discovered that the decimal representation of
consists of an endlessly repeating sequence of 16 digits.
I wonder what rational number has the longest sequence of repeating digits?
Considerable exploration has already been done on this subject.
Here are some basics that I remember . . .
If is a prime, the decimal for has a digit repeating cycle.
However, some primes can have even shorter cycles.
For example: .
What determines the length of the cycle for prime reciprocals?
It is the least for which is divisible by
In baby-talk, consider a string of 9's.
Begin dividing by a prime
When it "comes out even", stop.
The number of 9's is the length of the cycle.
Example:
The first time the division stops is: .
. . Therefore, has a 6-digit cycle.
Example:
The first time the division stops is: .
. . Therefore, has a 3-digit cycle.
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Here's another interesting feature . . .
. .
The last five decimals are cyclic arrangements of the first one.