1

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 $.

  • 4
    Not sure what you are asking. Are you aware that the list of primes for which $2$ is a primitive root is still unknown? I mean, nobody even knows if that list is finite or not. – lulu Aug 07 '22 at 17:37
  • 1
    For certain $n$ there is an answer - see this post, for example. In general, the question is open. See this MO-post for more comments. – Dietrich Burde Aug 07 '22 at 17:42
  • The answer is "for exactly the multiples of the order of $2$ mod $n$". There really isn't any simpler way to express that https://en.wikipedia.org/wiki/Multiplicative_order – Erick Wong Aug 07 '22 at 17:45
  • 2
    The primitive root business is a big obstruction. If the Artin conjecture holds, then there are infinitely many primes $p$ such that $2$ is a primitive root $\pmod p$. For all those primes, there would be only one solution to $2^n\equiv 1 \pmod p$, namely $p-1$. But, really, it's hard to prove much for general primes (let along general natural numbers). – lulu Aug 07 '22 at 17:56
  • 1
    here is a (partial) list of the primes for which $2$ is a primitive root. – lulu Aug 07 '22 at 18:03
  • 1
    Yes, you've got it. For any given prime, of course, we can answer the question (though if $p$ is very large, the computation might be unpleasant) but nobody knows how it works generally. – lulu Aug 07 '22 at 18:04
  • 2
    If $,n,$ is odd then $,2^k\equiv 1\pmod{!n}!\iff! o_n(2)\mid k,,$ where $,o_n(2),$ is the multiplicative order of $,2\bmod n,,$ i.e. the least $,j > 0,$ with $2^j\equiv 1.$ See mod order reduction. – Bill Dubuque Aug 07 '22 at 18:06
  • 1
    Ok so just summarizing what everyone else said, the solutions are exactly the multiples of $ o_2(n) $. 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. Another link 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 $. – Ian Gershon Teixeira Aug 07 '22 at 18:34
  • 1
    That is a great summary of the facts, and if you post it as a self-answer with suitable formatting, I'll upvote. The residues mod $n$ relatively prime to $n$ form a multiplicative group, so the fact that the order of this group is $\phi(n)$ aka Euler's totient function (easily computed) tells us the important fact that the order of $2$ divides $\phi(n)$. If $n$ has a known prime factorization, everything is pretty easy to compute. – hardmath Aug 11 '22 at 23:39
  • @hardmath Ok I did it – Ian Gershon Teixeira Aug 12 '22 at 19:27

1 Answers1

1

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 $.