Find a couple of integers such that the third power of a given natural can be written as the difference of the squares of those integers Given a natural number $n$, find inegers $a, b$ such that $n^3=a^2-b^2$. I've tried, but I'm a bit rusty. Please Help
 A: Note that
$$n^3=\left(\frac{n^2+n}{2}\right)^2-\left(\frac{n^2-n}{2}\right)^2.$$
Comment: The magic identity that solved the problem in fact did not (for me) come by magic.  Given a number $K$, we want to find numbers $a$ and $b$ such that $a^2-b^2=K$.  So we want $(a+b)(a-b)=K$.  This means that $a+b$ and $a-b$ are two integers whose product is $K$.  
Suppose that $x$ and $y$ are any two integers whose product is $K$.  If we set $a+b=x$ and $a-b=y$, then we will have $(a+b)(a-b)=K$. But will $a$ and $b$ be integers?
Solve the system $a+b=x$, $a-b=y$. Algebra gives $a=\frac{x+y}{2}$, $b=\frac{x-y}{2}$.  In order to make sure that $a$ and $b$ are integers, $x+y$ (and therefore $x-y$) must be even.  This means that $x$ and $y$ have to be of the same parity (both odd or both even).
Can we express $n^3$ as a product of two numbers of the same parity? If $n$ is odd, we can use $x=n^3$, $y=1$.  That won't work if $n$ is even. But $x=n^2$, $y=n$ always works, because $n^2$ and $n$ have the same parity.
In general, the integer $K$ is a difference of two squares unless $K$ is even but not divisible by $4$.  So $\pm 2$, $\pm 6$, $\pm 10$, $\pm 14$, and so on cannot be expressed as a difference of two squares, and everybody else can be.
A: If $n$ is odd, then $a=(n^3+1)/2$ and $b=(n^3-1)/2$ will work.
If $n$ is even, then $a=(n^3+2)/2$ and $b=(n^3-2)/2$.
