I had asked this question about Lehmer's bicycle chain sieve and while exploring that, the following question came up.
Consider the residue representation of $187 = 11 \times 17$ for residues modulo $m_i \in \{2, 3, 5, 7\}$:
$$ \begin{align} \begin{matrix} & & m_i \\ & & 2 & 3 & 5 & 7 \\ \hline 187 &:= & 1 & 1 & 2 & 5 \\ 11 &:= & 1 & 2 & 1 & 4 \\ 17 &:= & 1 & 2 & 2 & 3 \end{matrix} \end{align} $$
We have $\gcd(11, m_i) = \gcd(17, m_i) = 1$.
If we compute the various combinations of the non-zero residues modulo $m_i$, starting with the residue representation for $187$, we get:
$$ \begin{matrix} & m_i \\ & 2 & 3 & 5 & 7 & iteration \\ \hline \color{red}{187} := & 1 & 1 & 2 & 5 & 0\\ & 1 & 2 & 3 & 6 & 1\\ & 1 & 1 & 4 & 1 & 2\\ & 1 & 2 & 1 & 2 & 3\\ & 1 & 1 & 2 & 3 & 4\\ & 1 & 2 & 3 & 4 & 5\\ & 1 & 1 & 4 & 5 & 6\\ & 1 & 2 & 1 & 6 & 7\\ & 1 & 1 & 2 & 1 & 8\\ & 1 & 2 & 3 & 2 & 9\\ & 1 & 1 & 4 & 3 & 10\\ \color{blue}{11} := & 1 & 2 & 1 & 4 & 11\\ \color{red}{187} := & 1 & 1 & 2 & 5 & \color{red}{12}\\ & 1 & 2 & 3 & 6 & 13\\ & 1 & 1 & 4 & 1 & \vdots \\ & 1 & 2 & 1 & 2 \\ & 1 & 1 & 2 & 3 \\ & 1 & 2 & 3 & 4 \\ & 1 & 1 & 4 & 5 \\ & 1 & 2 & 1 & 6 \\ & 1 & 1 & 2 & 1 \\ & 1 & 2 & 3 & 2 & \vdots \\ & 1 & 1 & 4 & 3 & 22 \\ \color{blue}{11} := & 1 & 2 & 1 & 4 & 23 \\ \color{red}{187} := & 1 & 1 & 2 & 5 & \color{red}{24} \\ & 1 & 2 & 3 & 6 & \vdots \\ & 1 & 1 & 4 & 1 \\ \end{matrix} $$
We observe that the rows in the above table can be generated by repeating the non-zero residues sequentially. For eg: in the column for $2$, $1$ is the non-zero residue and is repeated. In the column for $3$, the non-zero residues are $1, 2$ and they are repeated. In the column for $5$, the sequence is $2, 3, 4, 1$ and it repeats. In the column for $7$, the sequence is $5,6,1,2,3,4$ and it repeats.
If we use the Lehmer sieve analogy, this is equivalent to chains with $m_i - 1$ links hung around the sprockets for each $m_i$. We initialize the sprockets and the chain links with the residue representation of $187$ and then run the sieve. After $11$ iterations, the sieve becomes periodic with period $12$.
My initial hypothesis was that this gets periodic for all numbers and the factor's residue representation occurs in the periodic sequence. However, that is not true as can be seen using the residue representation for $221 = 13 \times 17$.
$$ \begin{matrix} & m_i \\ & 2 & 3 & 5 & 7 & 11 \\ \hline 221 := & 1 & 2 & 1 & 4 & 1 \\ 13 := & 1 & 1 & 3 & 6 & 2 \\ 17 := & 1 & 2 & 2 & 3 & 6 \\ \end{matrix} $$
We then have,
$$ \begin{matrix} & m_i \\ & 2 & 3 & 5 & 7 & 11 \\ \hline 221 := & 1 & 2 & 1 & 4 & 1 \\ & 1 & 1 & 2 & 5 & 2 \\ & 1 & 2 & 3 & 6 & 3 \\ & 1 & 1 & 4 & 1 & 4 \\ & 1 & 2 & 1 & 2 & 5 \\ & 1 & 1 & 2 & 3 & 6 \\ & 1 & 2 & 3 & 4 & 7 \\ & 1 & 1 & 4 & 5 & 8 \\ & 1 & 2 & 1 & 6 & 9 \\ & 1 & 1 & 2 & 1 & 10 \\ & 1 & 2 & 3 & 2 & 1 \\ & 1 & 1 & 4 & 3 & 2 \\ & 1 & 2 & 1 & 4 & 3 \\ & 1 & 1 & 2 & 5 & 4 \\ & 1 & 2 & 3 & 6 & 5 \\ & 1 & 1 & 4 & 1 & 6 \\ & 1 & 2 & 1 & 2 & 7 \\ & 1 & 1 & 2 & 3 & 8 \\ & 1 & 2 & 3 & 4 & 9 \\ & 1 & 1 & 4 & 5 & 10 \\ & 1 & 2 & 1 & 6 & 1 \\ & 1 & 1 & 2 & 1 & 2 \\ & 1 & 2 & 3 & 2 & 3 \\ & 1 & 1 & 4 & 3 & 4 \\ & 1 & 2 & 1 & 4 & 5 \\ & 1 & 1 & 2 & 5 & 6 \\ & 1 & 2 & 3 & 6 & 7 \\ & 1 & 1 & 4 & 1 & 8 \\ & 1 & 2 & 1 & 2 & 9 \\ & 1 & 1 & 2 & 3 & 10 \\ & 1 & 2 & 3 & 4 & 1 \\ & 1 & 1 & 4 & 5 & 2 \\ & 1 & 2 & 1 & 6 & 3 \\ & 1 & 1 & 2 & 1 & 4 \\ & 1 & 2 & 3 & 2 & 5 \\ & 1 & 1 & 4 & 3 & 6 \\ & 1 & 2 & 1 & 4 & 7 \\ & 1 & 1 & 2 & 5 & 8 \\ & 1 & 2 & 3 & 6 & 9 \\ & 1 & 1 & 4 & 1 & 10 \\ & 1 & 2 & 1 & 2 & 1 \\ & 1 & 1 & 2 & 3 & 2 \\ & 1 & 2 & 3 & 4 & 3 \\ & 1 & 1 & 4 & 5 & 4 \\ & 1 & 2 & 1 & 6 & 5 \\ & 1 & 1 & 2 & 1 & 6 \\ & 1 & 2 & 3 & 2 & 7 \\ & 1 & 1 & 4 & 3 & 8 \\ & 1 & 2 & 1 & 4 & 9 \\ & 1 & 1 & 2 & 5 & 10 \\ & 1 & 2 & 3 & 6 & 1 \\ & 1 & 1 & 4 & 1 & 2 \\ & 1 & 2 & 1 & 2 & 3 \\ & 1 & 1 & 2 & 3 & 4 \\ & 1 & 2 & 3 & 4 & 5 \\ & 1 & 1 & 4 & 5 & 6 \\ & 1 & 2 & 1 & 6 & 7 \\ & 1 & 1 & 2 & 1 & 8 \\ & 1 & 2 & 3 & 2 & 9 \\ & 1 & 1 & 4 & 3 & 10 \\ 221 := & 1 & 2 & 1 & 4 & 1 \\ & 1 & 1 & 2 & 5 & 2 \\ & 1 & 2 & 3 & 6 & 3 \\ \end{matrix} $$
We see that while the sequence becomes periodic, the residue representation of none of the non-trivial factors of $221$ appear in this sequence.
Questions:
- In the first example of $187$, only the factor $11$ appeared in the periodic sequence of residue representations and $17$ did not appear. Is there a reason for this?
- In the second example of $221$, none of the factors appeared in the periodic sequence of residue representations. Is there a reason for this?
- Can we provide an initial condition (i.e., the starting value of the residues) that ensures that one of the factors of the number appears in the periodic sequence?
Remark: Obviously, if we start with the residue representation of one of the factors as the initial condition, it would eventually become periodic. So, there exists some initial condition (in fact, several) for which the factor's residue representation occurs in the periodic sequence.