2. (i) Expand and simplify $(x+1)\left(x^{2}-x+1\right)$.
(ii) Find all powers of 2 that are one more than a cube.
(A power of 2 is a number that can be written in the form $2^{n}$, where $n$ is an integer greater than or equal to 0 .)
SOLUTION
(i) $(x+1)\left(x^{2}-x+1\right)=\left(x^{3}-x^{2}+x\right)+\left(x^{2}-x+1\right)=x^{3}+1$.
(ii) Suppose that $2^{n}=k^{3}+1=(k+1)\left(k^{2}-k+1\right)$.
Both factors must be positive integers and also powers of 2 .
When $n=0$, we have $2^{0}=1=0^{3}+1$. So 1 is a power of 2 one more than a cube.
When $n=1$, we have $2^{1}=2=1^{3}+1$. So 2 is another power of 2 one more than a cube.
For all values of $n>1$, we have $k>1$, so that both factors $(k+1)$ and $\left(k^{2}-k+1\right)$ are powers of 2 greater than 1 . In particular $\left(k^{2}-k+1\right)$ must be even, but this is impossible $k$ and $k^{2}$ have the same parity (either both are even or both are odd), so $\left(k^{2}-k+1\right)$ is always odd.
Hence the only powers of 2 which are one more than a cube are 1 and 2 .