Sum of Three Cubes Puzzle
It is possible to write many integers as the sum of the cubes of three integers. For example
99 = (-5)^3 + 2^3+ 6^3
A more complicated example is
91 = (-67134)^3 + (-65453)^3+(83538)^3
Your task is to find integers x,y and z such that
33 = x^3 + y^3 + z^3
Hint: This is not a trivial problem and will (probably) require the use of a computer. Extra credit given if you also post your source code.
Update 3: If you are serious about attempting to crack this problem (and some people seem to be, judging from the comments), the following reference may be of help. The bibliography includes other jumping off points for this problem.
- Michael Beck, Eric Pine, Wayne Tarrant and Kim Yarbrough Jensen: New integer representations as the sum of three cubes Math. Comp. 76 (2007), 1683-1690 (Link)
Update 2: This problem is, in fact, a long-standing unsolved problem in number theory. If my memory serves me correctly, it is mentioned in the book Unsolved Problems in Number Theory
Update 1: 33 is very VERY difficult so why not use 16 as a warm up problem. MUCH smaller search space.
-100000,-99735,-23878
Code, in Scala:
val r = (-100000 to 100000)
for ( x <- r; y <- r; z <- r ) { if ( (x*x*x+y*y*y+z*z*z) == 33 ) println( x, y, z ) }
A faster search (n^2 rather than n^3 on the search limits):
val r = (-100000 to 100000)
for ( x <- r; y <- r; val z = scala.math.cbrt(33.0 – (x*x*x + y*y*y)).toInt ) { if ( (x*x*x+y*y*y+z*z*z) == 33.0 ) println( x, y, z ) }
Hi Alex
I’m afraid not
(-100000)^3 + (-99735)^3 + (-23878)^3 = -2005689597689823
See Wolfram Alpha for instance
http://www.wolframalpha.com/input/?i=%28-100000%29^3+%2B+%28-99735%29^3+%2B+%28-23878%29^3
You’ll need to copy and paste the link above. My blog software has truncated the clickable version for some reason
methinks you have an overflow error of some type :)
Mike, this is really hard problem!!??
http://www.staff.uni-bayreuth.de/~btm216/elk_ants6c.pdf
Hi ludoph
I wondered how long it would take for someone to find that :)
Indeed it is hard, one of the unsolved problems in number theory in fact. Here’s another useful link
http://www.asahi-net.or.jp/~KC2H-MSM/mathland/math04/matb0100.htm
I find it fascinating that the problem is so easy to state that you can explain it to a child and it is also easy to start to develop algorithms to try to solve it yet no one has ever managed to solve it. You quickly hit limits with a simple search (such as the maximum hardware integer problem that Alex ran into).
Perhaps now is a good time to resurrect the search? Computers have become a lot more powerful (and parallel!) in recent times.
@Mike Croucher
You are of-course correct. That’ll teach me to check my answers properly… :-)
No worries Alex, if it’s any consolation I made a very similar mistake when I first tried to solve it :)
@Mike Croucher
Here is very intersting list of known solution up to n=1000
http://www.uni-math.gwdg.de/jahnel/Arbeiten/Liste/threecubes_20070419.txt
@Mike Croucher
Here are a bunch for 16:
(-8746,-972,8750)
(-8746,8750,-972)
(-6142,-768,6146)
(-6142,6146,-768)
(-4114,-588,4118)
(-4114,4118,-588)
(-2590,-432,2594)
(-2590,2594,-432)
(-1609,-511,1626)
(-1609,1626,-511)
(-1498,-300,1502)
(-1498,1502,-300)
(-972,-8746,8750)
(-972,8750,-8746)
(-768,-6142,6146)
(-768,6146,-6142)
Having glanced at the link above, I’m not sure I have the available computing hardware to attack the problem with n=33. So I shall retire from the fight…
Thanks for the list ludolph. All that work and STILL no solution for 33 or 42.
I wonder if there is some interesting reason why some are so easy while others are so very hard.
@Mike Croucher
Hard problems have always interesting reasons … this is why I love mathematics and physics.
I’m glad I read the comments before my laptop melted searching for the result, it was already at 90C :)
Had I not read the comments I would have most definitely wasted the rest of the week (and the weekend most likely) trying to solve this.
Its a shame you read the comments then. It’s possible that you might have solved it with some innovative way of thinking.
I’m actually working on it anyway :-)
There goes my weekend!
Which language are you working in?
I’m trying to get something going within Mathematica 8 on a machine with 200 cores.
Cool! I’d suggest that you have a read of the paper I mentioned in ‘update 3’ of this blog post. A simple search isn’t going to work I think?
Yes, I got that. As of now I can’t even get 75, 52, 50, 30.
Can’t say that I have a lead on a really wise approach.
I wrote a simple code in python to do this… at the current rate it would take my computer over 100 centuries to crunch through the range(-10^14, 10^14)….. I do have a quad core and I’m only taking advantage of 1 thread. using them all would still take me over 3 years though…
33 = (8866128975287528)^3 + (−8778405442862239)^3 + (−2736111468807040)^3
Numberphile video: https://www.youtube.com/watch?v=ASoz_NuIvP0
PS: What about integers >1000? Any work has been done?