I've just come up with this question as I'm studying for a number theory midterm. If $p$ and $q$ are different prime numbers, and it's known that $2^p \equiv 1 \bmod{q}$, then $q\equiv 1 \bmod{p}$. I've tried a few cases and it seems to be true. How can it be proved?
1 Answers
Hint $\!\bmod q\!:\ 2^p,\, 2^{q-1}\! \equiv 1 \Rightarrow 2^{\gcd(p,q-1)}\! \equiv 1\Rightarrow\,$ $\overbrace{\gcd(\color{#c00}p,\,q\!-\!1) = \color{#c00}p}^{\textstyle \Rightarrow\ p\mid q\!-\!1\ }\, $ (not $\color{#c00}1$ else $\rm \,q\mid 2^{\color{#c00}1}\!-1$)
Or $\!\bmod q\!:\ 2^p\equiv 1\ \,\smash[t]{\overset{\rm\color{#0a0}m}\Rightarrow}\,\ 2\,$ has $\:\!\color{#c00}{\rm order }\,k\mid p\Rightarrow k = \color{#c00}p\; $ (not $\color{#c00}1$ else $\rm \,q\mid 2^{\color{#c00}1}\!-1)\,$ so by little Fermat $\ \bmod q\!:\,\ 2^{q-1}\equiv 1^{\phantom{|^|}}\smash[t]{\overset{\rm\color{#0a0}{m}}\Rightarrow}\,\ \color{#c00}p\mid q-1,\,$ by $\,\rm\color{#0a0}{m} =\,$ mod order reduction (or this Corollary).
Said in group theory language: $ $ if $\,g\ne 1$ has order dividing a prime $\,p\,$ then it has order equal $p.\,$ In ring theory language: if a principal ideal$\;\ne 1$ contains an irreducible element then that element generates the ideal (that's why a minimal polynomial is often called the "irreducible polynomial"). $ $ Here the group / ideal is simply the so-called order ideal $\,\{n : x^n = 1 \},\,$ which, being nonempty and closed under subtraction, comprises a subgroup / ideal of $\:\mathbb Z.\,$ The Euclidean algorithm implies that ideals in $\mathbb Z$ are principal, so every element of a nonzero ideal is a multiple of the least positive element. For an order ideal this simply says that every "possible" order is a multiple of the least possible order $\, m,\ $ i.e. $\; x^n = 1 \,\Rightarrow\, m\mid n.\,$ Compare this ring-theoretic proof to the ubiquitous group-theoretic proof using Lagrange's theorem.
Additive example of an order ideal: $ $ a denominator ideal $\ \{n\, :\, nx \in \mathbb Z \,\}$ of a fraction $\,x\in\Bbb Q.\,$ Here the above yields: if a proper fraction can be written with a prime denominator then it is the least possible denominator (in the multiplicative sense), i.e. it divides every other denominator.
Denominator ideals and fractional ideals can yield significant number-theoretical simplifications - in much the same way that fractional arithmetic often serves to simplify integer arithmetic in elementary number theory. For example, see this post on irrationality proofs using the denominator ideal. More generally, see this proof employing Dedekind's [conductor ideal] - a universal denominator for an entire extension ring. The links elaborate on tis topic.

- 272,048
1)$k=1$ - impossible.
2)$k=p\to p|(q-1)$
– Nurdin Takenov Sep 15 '10 at 13:54