If $10^e \equiv 1 \pmod n$ and $\gcd(10, n) \neq 1$ find the period of $\frac{1}{n}$

47 Views Asked by At

Consider $n=3$ so we have $\frac{1}{3}$. The period's repeating string of digit(s) is $1$ since $10^3 \equiv 1 \pmod 3$.

Now, consider $n = 6$ so we have $\frac{1}{6}$. Then the period of the fraction's repeating string of digit(s) is $1$, since $\frac{1}{6} = 0.166666....$

But the solution to $10^e \equiv 1 \pmod n$ doesn't exist, yet it is clear that $e$ is equal to $1$. How do we find $e$?

1

There are 1 best solutions below

0
On

It's impossible to find $e>0$ such that $10^e\equiv1\pmod{n}$ if you assume that $\gcd(10,n)\ne1$.

Indeed, if $10^e\equiv1\pmod{n}$ for some $e>0$, then $$ 10^{e-1}\cdot10+kn=1 $$ for some integer $k$, which implies (but is not equivalent to) $\gcd(10,n)=1$.

General theorem. If there exist integers $x$ and $y$ such that $xa+yb=1$, then $\gcd(a,b)=1$.

In your case, $x=10^{e-1}$ and $y=k$.