Power of $ 2 $ congruent to 1 mod n

122 Views Asked by At

Fix some odd $ n $. For which values of $ m $, $ 1\leq m \leq n $, is $ 2^m $ congruent to $ 1 $ mod $ n $?

For $ n=3 $ the solutions are $ 2^2=4 \equiv 1 $

For $ n=5 $ the solutions are $ 2^4=16 \equiv 1 $

For $ n=7 $ the solutions are $ 2^3=8 \equiv 1 $ and $ 2^6=64 \equiv 1 $

EDIT: I figured number theory part of MSE was especially brutal but even I didn't expect this many downvotes lol. Here is my motivation in an attempt to stave off the closing of this question: There is an action of the symmetric group $ S_n $ on the space $ 2^n $ of bit strings of length $ n $. For any subgroup $ G $ of $ S_n $ which contains an $ n $ cycle then the orbits of the action of $ G $ on $ 2^n $ should mostly have size a multiple of $ n $, except for the orbits of the all 0 bit string and the all 1 bit string. I am interesting in subspaces of $ \mathbb{F}_2^n $ which are invariant under the action of $ G $. I am interested in the possible dimension of such subspaces. For some reasons, I am not interested in subspaces that contain the all 1 bit string. Thus I am interested in a vector subspace of $ \mathbb{F}_2^n $ that is the union of the all 0 bit string with a bunch of orbits of the $ G $ action, all of which have size divisible by $ n $ since I am assuming $ G $ contains an $ n $ cycle. So the dimensions for such a nontrivial invariant subspace are the $ k $ such that $ 1 \leq k \leq n $ and $ 2^k $ is congruent to $ 1 $ mod $ n $.

1

There are 1 best solutions below

0
On BEST ANSWER

Ok so just summarizing what everyone else said, the solutions are exactly the multiples of $ o_n(2) $. So the number of solutions less than $ n $ is the floor function of $ n /o_2(n) $. When 2 is primitive mod $ n $ then this value is 1 and there is a unique solution. A list of primes for which $ 2 $ is primitive is linked above

https://oeis.org/A001122

Another link

2 is a primitive root mod $3^h$ for any positive integer $h$

shows that $ 2 $ is primitive for $ n $ any power of 3 so for $ n= 3, 9, \dots $ there is also a unique solution. For general small $ n $ the problem is not hard and, again, just boils to down to knowing the order of 2 mod $ n $. One thing to keep in mind is that $ \phi(n) $ is the order of the group of units of $ \mathbb{Z}/n\mathbb{Z} $ so $ o_2(n) $ must divide $ \phi(n) $ and $ o_2(n)=\phi(n) $ exactly when $ 2 $ is primitive mod $ n $.