I have a few questions about cyclic numbers in base $b$ ($b = 2$ in particular). We are dealing here with primes $p$ such that the length of the period in the decimal (more precisely base $b$) representation of $1/p$ is equal to $p-1$. For instance, in base $10$, primes $p=7, 17, 19, 23, 29, 47, 59, \cdots$ have this property. In base $2$, $p = 3, 5, 11, 13, 19, 29,\cdots$ have this property.
My questions are:
- Does the period of $1/p$, for large $p$'s satisfying this property (having a period of length $p-1$), look random?
- Can you compute the first $100,000$ primes in base $2$ satisfying this property?
Final purpose
The final purpose of this exercise is to check whether a number such as $e^{-1}$ has its digits uniformly distributed, by approximating $e^{-1}$ with a sequence $\{x_n\}$ built as follows: $x_n = b^n/q_n$ where $q_n$ is the prime in question that minimizes the approximation error. Here $b$ is the base. The idea is that such a converging sequence (or sub-sequence) exists for a number such as $e^{-1}$ ($x_n \rightarrow e^{-1})$ but maybe not for a rational number. As $e^{-1}$ is approximated by rational numbers of increasing period $n-1$, and as long as the period look random, at the limit, we would conclude that the digits of $e^{-1}$ are uniformly distributed.