How to show $\gcd \left(\frac{p^m+1}{2}, \frac{p^n-1}{2} \right)=1$, with $n$=odd? In previous post, I got the answer that $\gcd \left(\frac{p^2+1}{2}, \frac{p^5-1}{2} \right)=1$, where $p$ is prime number.
I am looking for more general case, that is for $p$ prime,

When is  $\gcd \left(\frac{p^r+1}{2}, \frac{p^t-1}{2} \right)=1$ ?

where $t=r+s$ such that $\gcd(r,s)=1$.
I am excluding the cases $r=1=s$.

In the previous post, it was $r=2,~t=5$. So $t=5=2+3=r+s$ with $s=3$ so that $\gcd(r,s)=1$.
In this current question:
Since $\gcd(r,s)=1$, we also have $\gcd(r,t)=1$.
I have the following intuition:
Case-I:
Assume $r$=even and $s$=odd so that $\gcd(r,s)=1$ as well as $\gcd(r,t)=1$.  We can also assume $r$=odd and $s$=even.
I think the same strategies of previous post can be applied to show that $$\gcd \left(\frac{p^r+1}{2}, \frac{p^t-1}{2} \right)=1.$$
Case II:
The problem arises when both $r$ and $s$ are odd numbers so that $t=r+s$ is even.
If I take $r=3, ~s=5$, then $t=8$.
For prime $p=3$, $\frac{p^r+1}{2}=\frac{3^3+1}{2}=14$ and $\frac{p^t-1}{2}=\frac{3^8-1}{2}=3280$ so that the gcd is $2$ at least.
For other primes also we can find gcd is not $1$.

So I think it is possible only for Case I, where among $r$ and $s$, one is odd and another is even so that $t$ is odd.
In other word, $t$ can not be even number.
But I need to be ensured with a general method.
So the question reduces to

How to prove $\gcd \left(\frac{p^m+1}{2}, \frac{p^n-1}{2} \right)=1$ ?

provided $\gcd(m,n)=1$ and $n$ is odd number and $p$ is prime number.
Thanks
 A: Suppose that
$$\gcd\left(\frac{p^m + 1}{2}, \frac{p^n - 1}{2}\right) \neq 1.$$
There are two cases:

*

*Both $p^m + 1$ and $p^n - 1$ are multiples of $4$.

*Both $p^m + 1$ and $p^n - 1$ are multiples of the same odd prime $q$.

In case 1, $p^m + 1 \equiv 0 \pmod 4$ implies that $p^m \equiv 3 \pmod 4$, so that $p \equiv 3 \pmod 4$ and $m$ is odd.  But then $p^n \equiv 3 \pmod 4$ as well, since $n$ is odd.  This contradicts the fact that $p^n - 1$ is a multiple of $4$.
In case 2, let $r$ be the order of $p$ modulo $q$.  Since $p^m \equiv -1 \pmod q$, $r$ must be even (as $r \mid 2m$, but $r \not \mid m$).  But this makes it impossible for $p^n \equiv 1 \pmod q$, since $n$ is odd and thus cannot be a multiple of $r$.
Since neither case is possible, it must be that $\gcd\left(\frac{p^m + 1}{2}, \frac{p^n - 1}{2}\right) = 1$.
A: For primes of the form $6k-1$, and choosing $m$ odd and $n$ even, you will obtain $p^m=6a-1$ and $p^n=6b+1$. Hence $p^m+1=6a$ and $p^n-1=6b$ with $\gcd(6a,6b) \ge 6$. Your final conjecture $\gcd \left( \frac{p^m+1}{2}, \frac{p^n-1}{2}\right)=1$ is never true in the circumstances considered here.
