1

Intuitively, I feel it's $1$, for example $(2, 3), (3,7)$ etc. But then I cannot go to prove it. Using the formula $ax+by=c$ does not make sense because of the power. Is it possible by induction? If I assume $a=1$, then $\operatorname{gcd}(1, 2^1-1)=1$ Assuming, it to be true for $k$, then

$$\operatorname{gcd}(k,2^k-1)=1 = kx+(2^k-1)y=1$$

I'm stuck here. Is it even possible with this method?

mrtaurho
  • 16,103
  • For $n=2^m-1$ for some $m$, see this question. – Dietrich Burde Nov 02 '18 at 19:38
  • 1
    If there is a prime $p$ such that $p(p-1)\mid a$ then $p$ is a common factor because Little Fermat tells us that $2^{p-1}\equiv1\pmod p$. Fpr example: $a=6=(3-1)\cdot3, p=3$, and $3\mid \gcd(6,2^6-1)$. But the flow of logic is in one direction only here. For example we don't need the factor $p-1$ if $2$ is not a primitiev root. $2^3\equiv1\pmod7$, so $7\mid\gcd(21,2^{21}-1)$. – Jyrki Lahtonen Nov 02 '18 at 19:40
  • I am trying to find 10 numbers which are relatively prime using the fact that is given in your shared question's answer. gcd(2^a-1, 2^b-1)=2^gcd(a,b)-1 – Sheetal Upadhyay Nov 02 '18 at 19:58
  • For $a\le 100$, the gcd can be $0$ (e.g. with $a=0$), $1$ ($a=1$), $3$ ($a=6$), $9$ ($a=18$), $5$ ($a=20$), $7$ ($a=21$), $21$ ($a=42$), $27$ ($a=54$), $15$ ($a=60$) or $25$ ($a=100$). – J.G. Nov 02 '18 at 19:58
  • 1

1 Answers1

1

Let us first determine all the primes $p$ (necessarily odd) which divide both $a$ and $2^a-1$. Writing $a=mp^{\alpha}$, with $\alpha$ maximal, one gets $ 2^{mp^{\alpha}}\equiv 1$ mod $p$, equivalently $2^m\equiv 1$ mod $p$ (by applying repeatedly F$l$T), equivalently $2^{r_p (m)}\equiv 1$ mod $p$, where $1\le r_p (m)\le p-1$ represents $m$ mod $(p-1)$. Finally, a necessary and sufficient condition is $a=mp^{\alpha}$ and $r_p (m)$ is a multiple of the order of the class of $2$ in the cyclic group $\mathbf F_p^*$ of order ($p-1$) .

It remains to determine the maximal power $s$ s.t. $p^s$ divides $a$ and $2^a-1$. In the language of $p$-adic valuations : if $v_p(p^s)=s$, then $s=$ min $(v_p(a), v_p(2^a-1))$. The precise value of $s$ depends of course on the given $a$. By definition, $v_p(a)=\alpha$. To compute $v_p(2^a-1)$, we can put $a=mq, q=p^{\alpha}$, and use the classical formula $X^q -1 =\prod f_d (X)$, where the product bears on all $d\mid q$ and $f_d(X)$ denotes the $d$-th cyclotomic polynomial of degree $\phi (d)$, $\phi$ being the Euler totient function see e.g. Lang's "Algebra", chap. VIII, §3). By definition, $f_d(X)= \prod (X-\zeta)$, where $\zeta$ runs through all the primitive $d$-th roots of $1$, and we want to compute the $p$-adic valuation of this product for $x=2^m$. Although a direct computation is possible, it is much more convenient to view $x-\zeta$ as an element of the $p$-adic field $K=\mathbf Q_p (\omega)$, where $\omega$ is a fixed primitive $d$-th root of $1$, and use the valuation $v_K$, the extension of $v_p$ to $K$ defined by $v_K(y)=v_p(N(y))/f$, where $f$ is the inertia index of $K/\mathbf Q_p$ and $N$ is the norm . Here, because $q$ is a power of $p$, $1-\omega$ is a uniformizer and $f=1$ (the ramification index is $e=\phi(d)$). Since the factors $x-\zeta$ are mutual conjugates, $f_d(x-\zeta)= N(x-\omega)$, so $v_p(f_d(x-\zeta))=v_K(x-\omega)$. But $2^m-\omega=(2^m-1)+ (1-\omega)$, and $v_K(2^m-1)=\phi(d).v_p(2^m-1)\ge \phi(d)>1$ because $d$ is a power of $p$, so $v_p(f_d(\zeta))=v_K(1-\omega)=1$. From this we deduce that $v_p(2^a-1)=\frac 12(\alpha+1)\alpha$ ./.

  • You're right, and incidentally you alluded to the order of the class of 2 mod p in your yesterday answer. I edit my post, and take the opportunity to complete the calculation of $v_p(2^a -1)$ - without error, I hope. – nguyen quang do Nov 04 '18 at 11:49