Finding all values of $n$ for which $1/n$ has a specific decimal period in different bases

221 Views Asked by At

I wanted to know if there is a way to easily determine the lowest value Natural number $n$ to where $1/n$ decimal actual period is purely repeating to $5$ digits in base $5$ and purely repeating to $4$ digits in base $6$?

What I learned so far

I had seen where $n$’s decimal representation independent of the base if the fraction is in lowest terms (is why I choose $1/n$) the period is limited to some $n-1$ or an integer $n-1$ is divisible by. It does not give the way to actually determine the period and it states the period may well be different for other bases.

For example $1/33$ could have periods of ($1,2,4,8,16,$ or $32$).

So my guessing point is lowest $n$ would need to be some multiple of $20$ then adding one also not having $2,3$ or $5$ as a prime factor to insure purely repeating for all chosen bases.

However I also saw for the denominator of $33$ that a period length of $10$ was given even though $33-1$ has no factors of $5$ in it so am left wondering if that theorem is actually true.

1

There are 1 best solutions below

2
On

For your first problem, the answer is that no such $n$ exists. Indeed, the base $6$ expansion having period $4$ tells you $n$ is a factor of $6^4-1=5\times 7\times 37$, and the base $5$ having period $5$ gives $n$ divides $5^5-1=2^2\times 11\times 71$. You can see these are incompatible constraints.

Now your confusion with $n=33$ seems to come from applying a theorem outside its domain

Theorem 1 Let $p$ be prime. The fundamental period of $1/p$ in base $b$ expansion, $b$ not divisible by $p$, is a factor of $p-1$.

This need not work for $n$ composite. Indeed, the above is derived from

Theorem 2 The minimal period of $1/n$ in base $b$ expansion, $\gcd(n,b)=1$, is the multiplicative order of $b$ modulo $n$.

Since the multiplicative group $(\mathbb{Z}/p)^\times$ has order $\phi(p)=p-1$, this gives the case $n=p$ is prime.