While solving the problems of chapter 1 from Introduction to Analytic Number Theory by Tom M. Apostol, I observed something interesting.
In problem 4, we show that $(a+b,a-b) = 1$ or $2$ and we have $(a+b)\cdot(a-b) = (a^2-b^2)$.
Similarly, in problem 5, we show that $(a+b,a^2-ab+b^2) = 1$ or $3$ and we have $(a+b)\cdot(a^2-ab+b^2) = (a^3+b^3)$.
I was wondering if it is true in general. My precise question is the following:
Can we expect that $(c,d) = 1$ or a factor of $n$, when $c\cdot d = a^n \pm b^n,$ where $c$ and $d$ are expression in $a$ and $b$.
And if it is true, what are those $n$?

To continue the general examples suggested above: if $p$ is an odd prime, then $\gcd\left(a + b, \frac{a^p + b^p}{a + b}\right) \in \{ 1, p \}$.
The proof uses what is called the lifting the exponent lemma. Suppose $q$ is a prime that divides $a + b$. Then $v_q(a^p + b^p) = v_q(a + b) + v_q(p)$, i.e., $v_q\left(\frac{a^p + b^p}{a + b}\right) = v_q(p)$. If $q = p$ this quantity is $1$; otherwise it is $0$. This tells us that $q$ divides $\frac{a^p + b^p}{a + b}$ if and only if $q = p$. Thus, if $p \mid a + b$, then $\gcd\left(a + b, \frac{a^p + b^p}{a + b}\right) = p$; otherwise, $\gcd\left(a + b, \frac{a^p + b^p}{a + b}\right) = 1$.
In fact, a similar argument shows that $\gcd\left(a + b, \frac{a^n + b^n}{a + b}\right)$ divides $n$.