## The Difference (and Sum) of Two Powers

We know that the difference of two squares can be factorised as follows:

$a^2-b^2=(a-b)(a+b)$

So for example: $9x^2-16=(3x-4)(3x+4)$

You may wonder if we can extend this to cubes and other powers. In fact, we can factorise the difference of any powers as follows:

$a^n-b^n=(a-b)(a^{n-1}+ba^{n-2}+b^2a^{n-3}+ \cdots +b^{n-3}a^2+b^{n-2}a+b^{n-1})=(a-b)\left(\sum_{r=0}^{n-1}a^{n-1-k}b^k\right)$

You may also wonder if we can factorise the sum of two powers. This only works for odd powers, and can be done as follows:

$a^{2n+1}+b^{2n+1}=(a+b)(a^{2n}-ba^{2n-1}+b^2a^{2n-2}- \cdots +b^{2n-2}a^2-b^{2n-1}a+b^{2n})=(a+b)\left(\sum_{r=0}^{2n} a^{2n-k}(-b)^k\right)$

Note that this time the signs in the factorisation alternate, starting with a $$+$$ in the first bracket, then a $$-$$ as the first sign in the second bracket, a $$+$$ as the second and so on.

## Proof of $$a^n-b^n$$

We can prove the above quite easily by considering the right-hand side of the equations. For the first equation, we have:

$(a-b)\left(\sum_{r=0}^{n-1}a^{n-1-k}b^k\right)$

Expanding gives: $a\sum_{r=0}^{n-1}(a^{n-1-k}b^k) -b\sum_{r=0}^{n-1}(a^{n-1-k}b^k)$

$=\sum_{r=0}^{n-1}(a^{n-k}b^k) -\sum_{r=0}^{n-1}(a^{n-1-k}b^{k+1})$

Notice that the second term is just the first term but with $$k+1$$ instead of $$k$$, so we can rewrite the second term as:

$\sum_{r=0}^{n-1}(a^{n-k}b^k) -\sum_{r=1}^{n}(a^{n-k}b^{k})$

Now notice that all of the terms accept $$a^n$$ and $$b^n$$ cancel, giving $$a^n-b^n$$.

## Proof of $$a^{2n+1}+b^{2n+1}$$

We can use a similar approach:

$(a+b)\left(\sum_{r=0}^{2n} a^{2n-k}(-b)^k\right)$

$=a\sum_{r=0}^{2n} (a^{2n-k}(-b)^k)+b\sum_{r=0}^{2n} (a^{2n-k}(-b)^k)$

$=a\sum_{r=0}^{2n} (a^{2n-k}(-b)^k)-(-b)\sum_{r=0}^{2n} (a^{2n-k}(-b)^k)$

$=\sum_{r=0}^{2n} (a^{2n-k+1}(-b)^k)-\sum_{r=0}^{2n} (a^{2n-k}(-b)^{k+1})$

$=\sum_{r=0}^{2n} (a^{2n-k+1}(-b)^k)-\sum_{r=0}^{2n} (a^{2n-k-1+1}(-b)^{k+1})$

$=\sum_{r=0}^{2n} (a^{2n-k+1}(-b)^k)-\sum_{r=1}^{2n+1} (a^{2n-k+1}(-b)^{k})$

$=a^{2n+1}-(-b)^{2n+1}$

$=a^{2n+1}+b^{2n+1}$

## $$a^{2n}+b^{2n}$$?

We could then, conjecture that we can write $$a^{2n}+b^{2n}$$ in the form $$(a+b)(p)$$, where $$p$$ is an integer if both $$a$$ and $$b$$ are integers. However, we can easily disprove this by counterexample.  For example, take $$a=1$$ and $$b=2$$. Then:

$1^2+2^2=(1+2)(p)$

$5=3p$

$\therefore p=\frac{5}{3}$

But this is not an integer, so our conjecture is false.