0

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.

76david76
  • 1,535
  • 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$. – lulu Jan 09 '17 at 15:45
  • @lulu And what does that say about $p-1$ ? – 76david76 Jan 09 '17 at 15:51
  • Do you know what Fermat's Little Theorem says and what it implies about the order of residues $\pmod p$? – lulu Jan 09 '17 at 15:57
  • @lulu Nice, that means that $k=n(p-1)$. Thanks! – 76david76 Jan 09 '17 at 16:07
  • 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$. – lulu Jan 09 '17 at 16:08
  • Right, that is what I thought. – 76david76 Jan 09 '17 at 16:12
  • @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? – 76david76 Jan 09 '17 at 16:17
  • 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. – lulu Jan 09 '17 at 16:43

0 Answers0