stardance has been extended another month! the new deadline is october 31 :)

You are browsing as a guest. Sign up (or log in) to start making projects!

alij

@alij

Joined June 18th, 2026

  • 1Devlogs
  • 2Projects
  • 1Ships
  • 8Votes
Ship Changes requested

I made an implementation of an algorithm to find solutions to the sums of three cubes problem! Some challenging aspects were making the algorithm work multithreaded, and saving/loading progress.

If you want to try it out, please download the C file from my github and run make.

  • 1 devlog
  • 9h
Try project → See source code →
Open comments for this post

9h 24m 8s logged

What three cube numbers sum to 29? Obviously, 3^3 + 1^3 + 1^3 works. What about 42? Well, the first ever solution was only discovered in 2019! It is 80435758145817515^3 + (−80538738812075974)^3 + 12602123297335631^3. Finding the three cubes which sum to a given number is a famous problem in the field of Diophantine equations, with many new results discovered in the past decade.

The algorithm to find these using a computer makes use of many breakthroughs in mathematics and computer science. Naively, you might nest three loops to get O(n^3) time complexity, but for the above solution you’d need to search at least 10^51 combinations, which is more than the number of atoms on Earth.

Researchers in the field have optimised the algorithm mathematically to about O(B(log log B)^(1+o(1))), where B is the upper bound for min(|x|, |y|, |z|). This still required large amounts of computing power for the new solutions found recently. The last possible number under 100 to be solved was 42 in 2019, which was possible through crowdsourced compute power from people’s spare computers.

I implemented the algorithm in C, and although I didn’t find new solutions (my laptop isn’t quite powerful enough) I did re-discover many solutions, including 30 which was found in 1999.

0
0
26

Followers

Loading…