then \(n\) is even and \(n^2\) is a factor of \(54\). Deduce that there is no integer \(n\) which satisfies the equation \(\eqref{eq:1sol}\).

Expand the brackets to obtain \[(n+3)^3=n^3+9n^2+27n+27,\] and \[(n-3)^3=n^3-9n^2+27n-27.\]

Then the equation simplifies to \[n^3-18n^2-54=0.\]

Now \(-18n^2-54\) must be even, so \(n^3\) must be even, and so \(n\) must be even.

Alternatively we could argue as follows:

if \(n\) is odd then \(n-3\) and \(n+3\) are both even, so \((n-3)^3\) and \((n+3)^3\) are both even.

But then \(n^3\) must be even, from our equation, and \(n\) must be even, which is a contradiction.

Therefore \(n\) cannot be odd, and must be even.

From the rearrangement \(n^2(n-18)=54\) we can see immediately, because \(n-18\) is an integer, that \(n^2\) is a factor of \(54\).

If there is an integer \(n\) which satisfies the equation then we know it must be even and \(n^2\) must be a factor of \(54\).

The prime factorisation of \(54\) is \(54=2\times3^3\) and so the only square factors of \(54\) are \(1^2\) and \(3^2\).

But \(1\) and \(3\) are not even, so there is no \(n\) that satisfies \(n^2(n-18)=54\).

Or we could say, the factors of \(54\) are \(1\), \(2\), \(3\), \(6\), \(9\), \(18\), \(29\) and \(54\), and none of these are even squares.

then \(n\) is even. Deduce that there is no integer \(n\) which satisfies the equation \(\eqref{eq:2sol}\).

It is easy to see why \(n\) is even here, arguing as for the first part.

So let \(n = 2k\), where \(k\) is an integer.

So the equation becomes \((2k-6)^3+(2k)^3=(2k+6)^3\), and we can divide by \(2^3\) to give \((k-3)^3+k^3=(k+3)^3\).

We know from the first part that this has no integer solutions.