Here's a question of a 'recreational' nature.
A similar question has already been posed for radix 10 in particular: Integer division: the length of the repetitive sequence after the decimal point . My question has been partly answered there; however, I'd be interested in anything further that can be added.
Suppose you have a rational number $n/d$ in simplest terms and a radix $r \ge 2$. Are there any results on the cycle length $l$ of the recurring part, and less importantly on the length of the prefix (numerals between the decimal point and the start of the recurring section)?
One result is that $l|d-1$.
I wonder whether there are simple results for various cases:
- $r$ is a prime $p$ (such as $2$)
- $r$ is a prime power $p^k$ (such as $16=2^4$)
- $r$ is square-free (such as $10 = 2 \cdot 5$), i.e. $r$ is a product of distinct primes, i.e $p^2|r$ for no prime $p$