Show that for any integer $n$, there will always exist integers $x,y$ such that $n^3 = x^2-y^2$

361 Views Asked by At

Problem: Show that for any integer $n$, there will always exist integers $x,y$ such that $n^3 = x^2-y^2$

My attempt: If $n^3 = x^2-y^2$, then $x = y \mod(n)$, and at the same time $x = -y \mod(n)$, So that $2x = 0 \mod(n)$. I could then split the problem into two cases: If $2^{-1}$ exists, then $x=kn$ for some integer $k$, and so the equation reduces to: $n^2(n-k^2)=-y^2$, so that $n<k^2$. This is about how far I have gotten, not sure how to proceed. Hints appreciated.

If $2^{-1}$ does not exist...

Edit: I made a mistake above, but now that the answer is given I will just leave it up for now.

5

There are 5 best solutions below

2
On BEST ANSWER

Factor $x^2-y^2=(x-y)(x+y)$. Particularly in contest math that should be your first thought on seeing a difference of squares.

If $n$ is odd, so is $n^3$ and you can write $n^3=2k+1$. Then $x=k+1, y=k$ works based on $2k+1=1\cdot (2k+1)$.

If $n$ is even you can write $n^3=8k$, note $8k=2\cdot (4k)$ and solve $x-y=2,x+y=4k$ to get $x=2k+1,y=2k-1$

This approach does not depend on the fact we are trying to express is a cube. The first works for all odd numbers, the second for all multiples of $4$. There is no solution for a number of the form $4k+2$

0
On

Insipred by Ross Millikan: Factoring, we get $n^3 = (x-y)(x+y)$

Claim: We can always find integers $x, y$ such that $x-y = n$ and $x+y = n^2$.

Proof: If we eliminate $y$ and solve for $x$, we get $x = \dfrac {n^2+n}{2}$. By considering even/odd cases you can see that $x$ is always an integer.

Next from $x-y = n$ we get $y = \dfrac {n^2+n}{2}-n$

3
On

Let $n$ be an integer.

Solving the system $$ \begin{cases} x+y=n^2\\[4pt] x-y=n\\ \end{cases} $$ yields the solution $$(x,y)=\left(\frac{n^2+n}{2},\frac{n^2-n}{2}\right)$$ where the integrality of $x,y$ is guaranteed since $n$ and $n^2$ are either both even or both odd.

0
On

One of my favorite observations concerns the sequence of odd numbers, which for any natural number $n$ contains some series of $n$ consecutive odd numbers which sum to any $k^{th}$ power of $n$. Therefore it can be shown the any $k^{th}$ power of $n$ (not just cubes) is the difference of two squares, viz: $$\sum_{i=\frac{n^{k-1}-n}{2}+1}^{\frac{n^{k-1}+n}{2}} (2i-1)=n^k=\sum_{i=1}^{\frac{n^{k-1}+n}{2}} (2i-1) -\sum_{i=1}^{\frac{n^{k-1}-n}{2}} (2i-1)=\bigl(\frac{n^{k-1}+n}{2}\bigr)^2-\bigl(\frac{n^{k-1}-n}{2}\bigr)^2$$For $k=3$, the resulting squares are just those in the answer given by quasi.

0
On

One way to systematically arrive at an answer is to assume that $$ \begin{align} x &= a_2 n^2 + a_1 n + a_0\\ y &= b_2 n^2 + b_1 n + b_0 \end{align} $$ We may assume $a_2,b_2>0$, changing signs if necessary. Then comparing coefficient of $n^4$ in $$ n^3 = x^2 - y^2 $$ forces $$ a_2 = b_2 $$

Next, comparing coefficient of constant forces $a_0=\pm b_0$. Having $a_0 = b_0$ would force $a_1 = b_1$ when comparing coefficient of $n^1$. This in turn forces coefficient of $n^3$ in $x^2 - y^2$ to be zero which is not possible, so $a_0 = -b_0$.

Now comparing coefficient of $n^1$ gives $b_1 = - a_1$. Comparing coefficients $n^3$ and $n^2$, we arrive at $$ 4a_2a_1 = 1, \quad 4a_2a_0 = 0 $$ Hence $a_0 = 0$. This leads to $$ \begin{align} x &= a_2n^2 + n/(4a_2)\\ y &= a_2n^2 - n/(4a_2) \end{align} $$

Only $a_2 = 1/2$ gives integral values of $x,y$ so we get $$ \begin{align} x &= n(n+1)/2\\ y &= n(n-1)/2 \end{align} $$