## Can x+3 and x^2+3 both be perfect cubes?

For the discussion of math. Duh.

Moderators: gmalivuk, Moderators General, Prelates

skullturf
Posts: 556
Joined: Thu Dec 07, 2006 8:37 pm UTC
Location: Chicago
Contact:

### Can x+3 and x^2+3 both be perfect cubes?

I actually saw this question in a Buzzfeed article about trivia addicts. There was a photograph of a blackboard at an ice cream shop that offered a free scoop of ice cream to the first person to answer the question.

The question is: Find a whole number x such that x+3 and x^2+3 are both perfect cubes, or show that this is impossible.

Since it was a question for a free scoop at an ice cream shop, I assumed it wouldn't require a lot of number theory, and could maybe be answered via a short and clever "trick".

But initially, I had trouble finding the trick. My first answer was a kind of clunky answer:

Spoiler:
If x+3 = a^3, then one way to show that x^2+3 is not a cube is to show that it lies between two consecutive cubes. If a is positive, I believe one can show that x^2+3 lies between (a^2-1)^3 and (a^2)^3, but the details are a bit clunky.

Later, I found what was probably the intended "trick". Here's a hint:

Spoiler:
If x+3 and x^2+3 are both perfect cubes, what's something else that's a perfect cube?

Finally, and here's where things might get a little more mathematically interesting:

Spoiler:
I'm pretty sure a stronger statement is true. I believe that when x is a whole number, x^2+3 cannot be a perfect cube, never mind whether x+3 is a cube or not.

Equivalently, I believe x^2 = y^3 - 3 has no integer solutions. This is an instance of Mordell's equation (except x and y are labeled in the opposite way to the usual convention) with n = -3, and some Googling seems to reveal that this is one of the cases of Mordell's equation that has no solutions.

I wonder if there's a reasonably self-contained proof that x^2 = y^3 - 3 has no integer solutions. It seems that there are for some instances of Mordell's equation, but others may be more subtle.

arbiteroftruth
Posts: 481
Joined: Wed Sep 21, 2011 3:44 am UTC

### Re: Can x+3 and x^2+3 both be perfect cubes?

Rather amusingly, the first solution I found to the original problem uses Fermat's last theorem as the final step.

skullturf
Posts: 556
Joined: Thu Dec 07, 2006 8:37 pm UTC
Location: Chicago
Contact:

### Re: Can x+3 and x^2+3 both be perfect cubes?

arbiteroftruth wrote:Rather amusingly, the first solution I found to the original problem uses Fermat's last theorem as the final step.

Heh, cool. Would you mind sharing your solution?

arbiteroftruth
Posts: 481
Joined: Wed Sep 21, 2011 3:44 am UTC

### Re: Can x+3 and x^2+3 both be perfect cubes?

Sure.

Spoiler:
If x+3 and x2+3 are both perfect cubes, then so is their product. So let that product be x3+3x2+3x+9=c3. This can be split into x3+3x2+3x+1+8=(x+1)3+23. Let x+1=a and let 2=b. Then the previous expression becomes a3+b3=c3. By FLT, this has no solution in whole numbers.

skullturf
Posts: 556
Joined: Thu Dec 07, 2006 8:37 pm UTC
Location: Chicago
Contact:

### Re: Can x+3 and x^2+3 both be perfect cubes?

Cool.

That's largely the same as what I suspect the intended "trick" is, except I didn't phrase the last step in terms of Fermat's Last Theorem.

My phrasing of the argument was:
Spoiler:
If x+3 and x^2+3 are both cubes, then so is their product x^3+3x^2+3x+9. But it's also true that x^3+3x^2+3x+9 = (x+1)^3+8. The only cubes that are 8 more than a perfect cube are 8 and 0, so x would have to be -1 or -3. But neither of those satisfy the original conditions.

tomtom2357
Posts: 563
Joined: Tue Jul 27, 2010 8:48 am UTC

### Re: Can x+3 and x^2+3 both be perfect cubes?

One way we could possibly solve the problem of whether x2+3 is a cube (call it y3) is to try modular arithmetic. x2=0,1,4(mod 8), so x3+3=3,4,7(mod 8). Therefore, since no cube is congruent to 4(mod 8), x is even, and y=3(mod 4). If you try the same trick modulo 7, you get that x=2,5(mod 7), and that y is divisible by 7. Using modulo 9 gives: x=4,5(mod 9), y=1(mod 3).
I have discovered a truly marvelous proof of this, which this margin is too narrow to contain.

Moole
Posts: 93
Joined: Sun Jan 08, 2012 9:52 pm UTC

### Re: Can x+3 and x^2+3 both be perfect cubes?

My solution to the original problem would be (which isn't too elegant, but is kind of fun and would probably extend to other similar problems more easily)

Spoiler:
Well, if they are both cubes, so x+3 = y^3 and x^2+3 = z^3. Then:
(y^3 - 3)^2 + 3 = z^3
then z is probably "somewhere near y^2", so you could set z = y^2 + c. Then we must find a pair (c,y) in Z2 solving this. Then:
(y^3 - 3)^2 + 3 = (y^2 + c)^3
(y^3 - 3)^2 + 3 = (y^2 + c)^3
y^6 - 6y^3 + 12 = y^6 + 3y^4c + 3y^2c^2 + c^3
0 = c^3 + 3y^2c^2 + 3y^4c - 12 + 6y^3 = f(c)

Note that f(c) must have only one root, differentiating to show f'(c) >= 0:

3f'(c) = c^2 + 2y^2c + y^4 = (c + y^3)^2 >= 0

Then, note f(-1) < 0 and f(1) > 0, showing the unique root is somewhere in (-1,1) and then that f(0) is not 0, implying the non-existence of any integer pairs (c,y) for which f(c)=0:

f(-1) = -1 + 3y^2 - 3y^4 - 12 + 6y^3 = -3y^4 + 6y^3 + 3y^2 - 13
Which, clearly, for y > (6 + 3 + 13)/3, or y >= 8, has the term |-3y^4| greater than the absolute value of every other term combined, and so is negative. For y = 1 through 7, one may check by computation.
f(1) = 1 + 3y^2 + 3y^4 - 12 + 6y^3 = 3y^4 + 6y^3 + 3y^2 - 11
Which, clearly, for y > (6 + 3 + 11)/3, or y >=7, has the term |3y^4| greater than the absolute value of every other term combined, and so is negative. For y = 1 through 6, one may check by computation.
Completing the proof, we show that f(0) = -12 + 6y^3 has no integer roots in y. Its only real root is y=2^(1/3), not an integer. Therefore, x+3 and x^2+3 cannot both be perfect cubes.
Mathematical hangover (n.): The feeling one gets in the morning when they realize that that short, elementary proof of the Riemann hypothesis that they came up with at midnight the night before is, in fact, nonsense.

tomtom2357
Posts: 563
Joined: Tue Jul 27, 2010 8:48 am UTC

### Re: Can x+3 and x^2+3 both be perfect cubes?

Moole wrote:My solution to the original problem would be (which isn't too elegant, but is kind of fun and would probably extend to other similar problems more easily)

Spoiler:
Well, if they are both cubes, so x+3 = y^3 and x^2+3 = z^3. Then:
(y^3 - 3)^2 + 3 = z^3
then z is probably "somewhere near y^2", so you could set z = y^2 + c. Then we must find a pair (c,y) in Z2 solving this. Then:
(y^3 - 3)^2 + 3 = (y^2 + c)^3
(y^3 - 3)^2 + 3 = (y^2 + c)^3
y^6 - 6y^3 + 12 = y^6 + 3y^4c + 3y^2c^2 + c^3
0 = c^3 + 3y^2c^2 + 3y^4c - 12 + 6y^3 = f(c)

Note that f(c) must have only one root, differentiating to show f'(c) >= 0:

3f'(c) = c^2 + 2y^2c + y^4 = (c + y^3)^2 >= 0

Then, note f(-1) < 0 and f(1) > 0, showing the unique root is somewhere in (-1,1) and then that f(0) is not 0, implying the non-existence of any integer pairs (c,y) for which f(c)=0:

f(-1) = -1 + 3y^2 - 3y^4 - 12 + 6y^3 = -3y^4 + 6y^3 + 3y^2 - 13
Which, clearly, for y > (6 + 3 + 13)/3, or y >= 8, has the term |-3y^4| greater than the absolute value of every other term combined, and so is negative. For y = 1 through 7, one may check by computation.
f(1) = 1 + 3y^2 + 3y^4 - 12 + 6y^3 = 3y^4 + 6y^3 + 3y^2 - 11
Which, clearly, for y > (6 + 3 + 11)/3, or y >=7, has the term |3y^4| greater than the absolute value of every other term combined, and so is negative. For y = 1 through 6, one may check by computation.
Completing the proof, we show that f(0) = -12 + 6y^3 has no integer roots in y. Its only real root is y=2^(1/3), not an integer. Therefore, x+3 and x^2+3 cannot both be perfect cubes.

I have to say, on the whole, that I like their solution better (2 lines versus 20), but this is still an interesting argument.
I have discovered a truly marvelous proof of this, which this margin is too narrow to contain.

eta oin shrdlu
Posts: 451
Joined: Sat Jan 19, 2008 4:25 am UTC

### Re: Can x+3 and x^2+3 both be perfect cubes?

tomtom2357 wrote:One way we could possibly solve the problem of whether x2+3 is a cube (call it y3) is to try modular arithmetic. x2=0,1,4(mod 8), so x3+3=3,4,7(mod 8). Therefore, since no cube is congruent to 4(mod 8), x is even, and y=3(mod 4). If you try the same trick modulo 7, you get that x=2,5(mod 7), and that y is divisible by 7. Using modulo 9 gives: x=4,5(mod 9), y=1(mod 3).
This equation turns out to have solutions modulo every prime, though:
Spoiler:
For every prime p>3, at least one of -4, -3, -2, 24 is a quadratic residue mod p.
I haven't checked all the prime-power cases, but I suspect they all have solutions too.

tomtom2357
Posts: 563
Joined: Tue Jul 27, 2010 8:48 am UTC

### Re: Can x+3 and x^2+3 both be perfect cubes?

eta oin shrdlu wrote:
tomtom2357 wrote:One way we could possibly solve the problem of whether x2+3 is a cube (call it y3) is to try modular arithmetic. x2=0,1,4(mod 8), so x3+3=3,4,7(mod 8). Therefore, since no cube is congruent to 4(mod 8), x is even, and y=3(mod 4). If you try the same trick modulo 7, you get that x=2,5(mod 7), and that y is divisible by 7. Using modulo 9 gives: x=4,5(mod 9), y=1(mod 3).
This equation turns out to have solutions modulo every prime, though:
Spoiler:
For every prime p>3, at least one of -4, -3, -2, 24 is a quadratic residue mod p.
I haven't checked all the prime-power cases, but I suspect they all have solutions too.

Actually, I can do one better:
Spoiler:
For every prime p>3, at least one of -3, -2, 24 is a quadratic residue mod p.

Proof: Assume that none of -3, -2, 24 are quadratic residues mod p, then -3, -2 are non-residues. Therefore 6 is a quadratic residue (the product of two non- quadratic residues is a residue, and therefore 24 is a residue (6*4=24, and the product of two quadratic residues is also a quadratic residue)
I have discovered a truly marvelous proof of this, which this margin is too narrow to contain.

eta oin shrdlu
Posts: 451
Joined: Sat Jan 19, 2008 4:25 am UTC

### Re: Can x+3 and x^2+3 both be perfect cubes?

tomtom2357 wrote:Actually, I can do one better:
Spoiler:
For every prime p>3, at least one of -3, -2, 24 is a quadratic residue mod p.

Proof: Assume that none of -3, -2, 24 are quadratic residues mod p, then -3, -2 are non-residues. Therefore 6 is a quadratic residue (the product of two non- quadratic residues is a residue, and therefore 24 is a residue (6*4=24, and the product of two quadratic residues is also a quadratic residue)
Good point.

tomtom2357
Posts: 563
Joined: Tue Jul 27, 2010 8:48 am UTC

### Re: Can x+3 and x^2+3 both be perfect cubes?

eta oin shrdlu wrote:
tomtom2357 wrote:Actually, I can do one better:
Spoiler:
For every prime p>3, at least one of -3, -2, 24 is a quadratic residue mod p.

Proof: Assume that none of -3, -2, 24 are quadratic residues mod p, then -3, -2 are non-residues. Therefore 6 is a quadratic residue (the product of two non- quadratic residues is a residue, and therefore 24 is a residue (6*4=24, and the product of two quadratic residues is also a quadratic residue)
Good point.

Doesn't really help us though. I'll check to see if there is a theorem that x2+3 cannot be a cube.
I have discovered a truly marvelous proof of this, which this margin is too narrow to contain.

Who
Posts: 108
Joined: Wed Oct 02, 2013 2:53 am UTC

### Re: Can x+3 and x^2+3 both be perfect cubes?

Spoiler:
I did this without reading any of the solutions/hints and did not think of "If x+3 and x^2+3 are cubes then so is their product".
My solution:
For positive x+3s:
If x+3 is a perfect cube then x+3=m where m is a perfect cube, m=n^3 where n is an integer)
x+3=m, x=(m-3), x^2=(m-3)^2=m^2-6m+9, x^2+3=m^2-6m+12=
m^2 is a perfect cube.
The difference between x^2+3 and m^2 is m^2-6m+12-m^2=-6m+12=-6n^3+12
If x+3 is positive then (x+3)^2>x^2+3
The closest cube to n^6 which is greater than n^6 is (n^2+1)^3, thus if x^2+3 is in between n^6 and (n^2+1)^3 then it is not a perfect cube.
The difference between (n^2+1)^3 and n^6 is 3n^4+3n^2+1
Thus if 3n^4+3n^2+1>12-6n^3 then x+3 and x^2+3 are not perfect cubes where n is positive.
Thus if 6n^3+3n^2+3n>11 then x+3 and x^2+3 are not perfect cubes where n is positive.
The minimum n can be is 1 if it is positive, 6+3+3=12>11, thus x+3 and x^2+3 cannot both be perfect cubes where n is positive.
For negative x+3s:
If x+3 is a perfect cube then x+3=m where m is a perfect cube, m=n^3 where n is an integer)
x+3=m, x=(m-3), x^2=(m-3)^2=m^2-6m+9, x^2+3=m^2-6m+12=
m^2 is a perfect cube.
The difference between x^2+3 and m^2 is m^2-6m+12-m^2=-6m+12=-6n^3+12
If x+3 is negative then (x+3)^2<x^2+3
The closest cube to n^6 which is less than n^6 is (n^2-1)^3, thus if x^2+3 is in between n^6 and (n^2-1)^3 then it is not a perfect cube.
The difference between n^6 and (n^2-1)^3 is n^6-n^6+3n^4-3n^2+1=3n^4-3n^2+1
Thus if 3n^4-3n^2+1>12-6n^3 then the hypothesis is false for negative ns
Thus if 3n^4+6n^3-3n^2>11 then the hypothesis is false for negative ns
3n^4+6n^3-3n^2-11=f(x)
f'(x)= 12n^3+18n^2-6n
The critical numbers of that are: n=0, n=.28, n=-1.78
When n=-3 then f'=-144 and f=43, given how it is decreasing, positive, and with no critical numbers of the first derivative, n cannot be less than 3.
Brute force time!
If n is -1 then x is -4 and x^2+3=19=not a cube
If n is -2 then x is -11 then x^2+3=124=not a cube
If n is -3 then x is -30 then x^2+3=903=not a cube
That was way more complex than it should have been.

What I was trying to do (A simpler explanation of why it intuitively shouldn't work, but not an actual proof):
Spoiler:
Cubes are rarer as they get larger, and they get rare by more than just linearly
(x+3)^2 must also be a cube if x+3 is a cube
x^2+6x+3 must be a cube if x+3 is a cube
x^2+6x+3 - (x^2+3) = 6x
The difference between any 2 sufficiently large cubes will not be 6x.
Thus if it's possible they have to be small
But trying the small ones, they don't work
Thus it can't happen

Lopsidation
Posts: 183
Joined: Tue Oct 27, 2009 11:29 pm UTC

### Re: Can x+3 and x^2+3 both be perfect cubes?

x2+3 is never a cube.

Spoiler:
Suppose x2+3=y3.
Let w be a cube root of unity. Work in Z[w], the Eisenstein integers.
Then y3 = x2 + 3 = (x - (2w+1))(x + (2w+1)).
gcd(x - (2w+1),x + (2w+1)) is a factor of 4w+2, which is not a multiple of any non-unit cube.
Therefore, x - (2w+1) and x + (2w+1) are both cubes times some unit (1, w, or w2).

[There's probably a simple way to finish from here, but I couldn't find it]

So, there are three possibilities:
(a) x+2w+1 = (a+wb)3 = a3+b3+3wa2b-3ab2-3wab2
(b) x+2w+1 = w(a+wb)3 = wa3+wb3-3a2b-3wa2b+3ab2
(c) x+2w+1 = w2(a+wb)3 = -a3-wa3-b3-wb3+3a2b+3wab2

Case (a) would imply 2w=3wa2b-3wab2, which is impossible mod 3.
Case (b) would imply 2w=wa3+wb3-3wa2b, which is impossible mod 4.
Case (c) would imply 2w=wa3-wb3+3wab2, which is also impossible mod 4.

So every case is impossible. Contradiction! x2+3 is never a cube. █

tomtom2357
Posts: 563
Joined: Tue Jul 27, 2010 8:48 am UTC

### Re: Can x+3 and x^2+3 both be perfect cubes?

Oh, cool.
I have discovered a truly marvelous proof of this, which this margin is too narrow to contain.

Return to “Mathematics”

### Who is online

Users browsing this forum: No registered users and 10 guests