Proving two equations involving the greatest common divisor 
Show or prove that $$\gcd \left(\frac{a^{2m}-1}{a+1} ,a + 1\right )=\gcd(a + 1 , 2m),$$
  and that
  $$\gcd \left(\frac{a^{2m + 1}+1}{a+1} , a + 1\right)=\gcd(a + 1 , 2m + 1).$$

 A: I will show that $$\gcd \left(\frac{a^{2m}-1}{a+1} ,a + 1\right )=\gcd(a + 1 , 2m)$$
First note that $$a^{2m}-1=(a^2)^m-1=(a^2-1)(a^{2(m-1)}+
a^{2(m-2)}+\cdots+1)$$
so that $$\frac{a^{2m}-1}{a+1}=(a-1)(a^{2(m-1)}+\cdots+1)$$
But $a\equiv -1 \mod a+1$ so we have
$$\frac{a^{2m}-1}{a+1}\equiv -2((-1)^{2(m-1)}+\cdots+1)=-2m$$
which means $$\gcd \left(\frac{a^{2m}-1}{a+1} ,a + 1\right )=\gcd(a + 1 , 2m)$$
Can you do something similar with the other?
A: Let integer $d\ne0$ divides $a+1$ i.e., $a+1=c\cdot d$(say)  where $c\ne0$ is some integer
$\implies a=c\cdot d-1$
$$\gcd \left(\frac{a^{2m}-1}{a+1} ,a + 1\right )$$
$$=\gcd \left(\frac{(c\cdot d-1)^{2m}-1}{c\cdot d} ,c\cdot d\right )$$
$$=\gcd \left( (c\cdot d)^{2m-1}-\binom{2m}1(c\cdot d)^{2m-2}+ \binom{2m}2(c\cdot d)^{2m-3}+\cdots+\binom{2m}{2m-2}(c\cdot d)-\binom{2m}{2m-1},c\cdot d\right)$$
$$=\gcd\left( c\cdot d\{(c\cdot d)^{2m-2}-\binom{2m}1(c\cdot d)^{2m-3}+ \binom{2m}2(c\cdot d)^{2m-4}+\cdots+\binom{2m}{2m-2}\}-2m,c\cdot d\right)\text{ as } \binom{2m}{2m-1}=\binom{2m}{2m-(2m-1)}=\binom{2m}1=2m$$
$$=\gcd(-2m, c\cdot d)\text{ as }\gcd(p+kq,q)=\gcd(p,q)$$
$$=\gcd(2m, a+1)$$
Can you solve the second one now?
