ESP

Sum of cubes

This applet finds the decomposition of any integer number not congruent to 4 or 5 (mod 9) into a sum of four cubes.

The applet uses the following formulas:

If n = 164, 596, 1892, 2324, 2756, 4052, 4484 (mod 6480) the following formula is used:

54x + 2 = (29484x2 + 2211x + 43)3 + (-29484x2 - 2157x - 41)3 + (9828x2 + 485x + 4)3 + (-9828x2 - 971x - 22)3

If n = 254, 902, 1442, 1874, 1982, 2414, 3062, 3494, 3602, 4034, 4142, 5114, 5222, 5654, 5762, 6302 (mod 6480) a method due to Demjanenko is used. Notice that the results can have hundreds of digits in this case.

In the remaining cases the number n is replaced by -n and then all solutions are multiplied by -1.

If you find any error or you have a comment, please fill in the form.

Written by Dario Alpern.

Source code

You can download the source of the current program and the old sum of four cubes applet from here. Notice that the source code is in C language and you need the Emscripten environment in order to generate Javascript.

You can also enter expressions that use the following operators and parentheses: