0
$\begingroup$

I've noticed, that $\frac{1}{p}$ for all prime numbers, the length of their period in decimal presentation divides $p-1$, except $2,5$ whom their decimal fraction is finite. I haven't been able to prove it though.

I think it can be proven using Euclidean's long division, but I haven't got any luck there.

Thanks in advance for your help.

  • 1
    Hint: if the period of $\frac 1p$ is $k$ then $10^k\times \frac 1p=N +\frac 1p$ for some integer $N$. Thus $10^k\equiv 1 \pmod p$.2017-01-09
  • 0
    @lulu And what does that say about $p-1$ ?2017-01-09
  • 0
    Do you know what [Fermat's Little Theorem](https://en.wikipedia.org/wiki/Fermat's_little_theorem) says and what it implies about the order of residues $\pmod p$?2017-01-09
  • 0
    @lulu Nice, that means that $k=n(p-1)$. Thanks!2017-01-09
  • 0
    No, the other way round. It means that $kn=p-1$. the period can definitely be smaller than $p-1$. For $p=11$, for example, $k=2$. A little more work shows that the period of $\frac 1p$ is exactly the order of $10\pmod p$.2017-01-09
  • 0
    Right, that is what I thought.2017-01-09
  • 0
    @lulu What do you mean "...the order of $10\mod p$" ? For example, for 17 the length is 16, for 37, the length is 3, so are you saying that there is a formula to know for any prime?2017-01-09
  • 1
    The order of $10\pmod {17}$ is $16$. But the order of $10\pmod {37}$ is $3$ (since $10^3=1000\equiv 1 \pmod {37}$). There is no known formula to compute the order of a number modulo a prime.2017-01-09

0 Answers 0