<s>[INST] How I find $\gcd(\frac{a^{2m+1}+1}{a+1}, a+1)$? $$\gcd\left(\frac{a^{2m+1}+1}{a+1}, a+1\right)$$
My answer until this moment is: 
$$
For:  a^{2m+1}+1^{2m+1} = (a + 1)^{m+1} - 2a = (a+1)^m(a+1)-2a
$$ where 
\begin{align}
(a + 1)^{m} = a^{2m}+a^{2m-1}+\cdots+1
\end{align}
So,
\begin{align}
a^{2m+1}+1 = [a^{2m}+a^{2m-1}+\cdots+1](a+1)-2a
\end{align}
But, I don't know how to divide :
\begin{align}
\frac{[a^{2m}+a^{2m-1}+\cdots+1](a+1)-2a}{a+1}
\end{align}
 [/INST] $$
\begin{align}
\frac{a^{2m+1}+1}{a+1}
&=\frac{((a+1)-1)^{2m+1}+1}{a+1}\tag1\\
&=\sum_{k=1}^{2m+1}(-1)^{k-1}\binom{2m+1}{k}(a+1)^{k-1}\tag2\\[6pt]
&\equiv2m+1\pmod{a+1}\tag3
\end{align}
$$
Explanation:
$(1)$: $a=(a+1)-1$
$(2)$: Binomial Theorem and algebra
$(3)$: the $k=1$ term is the only one without a factor of $a+1$  
Therefore,
$$
\gcd\left(\frac{a^{2m+1}+1}{a+1},a+1\right)=\gcd(2m+1,a+1)\tag4
$$
</s>