0
$\begingroup$

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$
$\endgroup$
1
  • 2
    $\begingroup$ l divides the totient of d, which doesn't necessarily divide d-1. In any case, the form of r is irrelevant, since the answer only depends on the value of r mod d. $\endgroup$ Aug 16, 2010 at 23:16

1 Answer 1

1
$\begingroup$

Write $d=2^p 5^q m$, where $(m,10)=1$. Then the length of the prefix of $n/d$ is $\max(p,q)$. (That's for base 10, of course.)

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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