Let $a$ and $b$ be positive integers. Prove that $\operatorname{gcd}\left(n^{a}+1, n^{b}+1\right)$ divides $n^{\operatorname{gcd}(a, b)}+1$.
My work -
I proved this for $n=2$ but I am not able to prove this for all $n$ (if anyone wants I can give my proof for $n=2$).
More Observation.
If $a$ and $b$ are both odd, then $d=\gcd(a,b)$ is an odd positive integer. Therefore, $$n^a+1=(n^d+1)\left(n^{d(a-1)}-n^{d(a-2)}+\ldots-n^d+1\right)$$ and $$n^b+1=(n^d+1)\left(n^{d(b-1)}-n^{d(b-2)}+\ldots-n^d+1\right),$$ whence $n^d+1$ divides both $n^a+1$ and $n^b+1$. That is, $n^d+1$ divides $\gcd(n^a+1,n^b+1)$. However, we can perform Euclidean algorithm as follows.
Without loss of generality, let $a\geq b$.
Case I: $a\geq 2b$. We have $$n^a+1=(n^{b}+1)\left(n^{a-b}-n^{a-2b}\right)+(n^{a-2b}+1)\,.$$ We can replace $(a,b)$ by $(a-2b,b)$, and perform more reduction steps.
Case II: $b<a<2b$. We have $$n^{a}+1=(n^b+1)n^{a-b}-\left(n^{a-b}-1\right)$$ and $$n^b+1=\left(n^{a-b}-1\right)n^{2b-a}+(n^{2b-a}+1)\,.$$ Thus, we can replace $(a,b)$ by $(b,2b-a)$ and perform more reduction steps.
Case III: $a=b$. Then, the reduction steps end.
Note that, at each step, the difference between $a$ and $b$ never increases. (Observe that, we cannot perform the steps in Case II infinitely many times, as the smaller value between $a$ and $b$ always decreases.) Therefore, the process has to stop when both numbers become the same odd integer $s$, which is an integer combination of $a$ and $b$. However, $d$ divides any integer combination of (the starting values of) $a$ and $b$. Thus, $d$ divides $s$. The Euclidean algorithm above shows that $n^s+1$ is the greatest common divisor of $n^a+1$ and $n^b+1$. Thus, $s=d$, so in the case $a$ and $b$ are odd, $$\gcd(n^a+1,n^b+1)=n^{\gcd(a,b)}+1\,.$$