<s>[INST] 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).$$

 [/INST] 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?
</s>