## Task 24/71

Determine the greatest common divisor of $2^{n-1}-1$ and $2^{n+1}-1$ for $n=2 ; 3 ; \ldots$ !
Assuming the greatest common divisor of $2^{n-1}-1$ and $2^{n+1}-1$ is $p$. Then,

$$
2^{n-1}-1=p k_{1} ; \quad 2^{n+1}-1=p k_{2} ; \quad \text { thus } \quad 2^{n-1}=p k_{1}+1 ; \quad 2^{n+1}=p k_{2}+1
$$

consequently $p k_{2}+1=4\left(p k_{1}+1\right)=4 p k_{1}+4$. This leads to $p\left(k_{2}-4 k_{1}\right)=3$. Therefore, either $p=1$ and $k_{2}-4 k_{1}=3$ or $p=3$ and $k_{2}-3 k_{1}=1$.

It remains to investigate for which $n$ $p=1$ or $p=3$ results. The power $2^{m}$ leaves a remainder of 1 when divided by 3 if $m$ is even, and a remainder of 2 if $m$ is odd (see Problem 35, Issue 2/1962). Now, $n-1$ and $n+1$ are either both even, in which case $p=3$, or both odd, in which case $p=1$. Thus, we can summarize: If $n$ is odd, the greatest common divisor of $2^{n-1}-1$ and $2^{n+1}-1$ is the number $p=3$; if $n$ is even, the greatest common divisor of these numbers is the number $p=1$.