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.

Formulas

The applet uses the following formulas:

  • 6x = parenthesis(x − 1close parenthesis)³ + parenthesis(−xclose parenthesis)³ + parenthesis(−xclose parenthesis)³ + parenthesis(x + 1close parenthesis)³
  • 6x + 3 = x³ + parenthesis(−x + 4close parenthesis)³ + parenthesis(2x − 5close parenthesis)³ + parenthesis(−2x + 4close parenthesis)³
  • 18x + 1 = parenthesis(2x + 14close parenthesis)³ + parenthesis(−2x − 23close parenthesis)³ + parenthesis(−3x − 26close parenthesis)³ + parenthesis(3x + 30close parenthesis)³
  • 18x + 7 = parenthesis(x + 2close parenthesis)³ + parenthesis(6x − 1close parenthesis)³ + parenthesis(8x − 2close parenthesis)³ + parenthesis(−9x + 2close parenthesis)³
  • 18x + 8 = parenthesis(x − 5close parenthesis)³ + parenthesis(−x + 14close parenthesis)³ + parenthesis(−3x + 29close parenthesis)³ + parenthesis(3x − 30close parenthesis)³
  • 54x + 20 = parenthesis(3x − 11close parenthesis)³ + parenthesis(−3x + 10close parenthesis)³ + parenthesis(x + 2close parenthesis)³ + parenthesis(−x + 7close parenthesis)³
  • 72x + 56 = parenthesis(−9x + 4close parenthesis)³ + parenthesis(x + 4close parenthesis)³ + parenthesis(6x − 2close parenthesis)³ + parenthesis(8x − 4close parenthesis)³
  • 108x + 2 = parenthesis(−x − 22close parenthesis)³ + parenthesis(x + 4close parenthesis)³ + parenthesis(−3x − 41close parenthesis)³ + parenthesis(3x + 43close parenthesis)³
  • 216x + 92 = parenthesis(3x − 164close parenthesis)³ + parenthesis(−3x + 160close parenthesis)³ + parenthesis(x − 35close parenthesis)³ + parenthesis(−x + 71close parenthesis)³
  • 270x + 146 = parenthesis(−60x + 91close parenthesis)³ + parenthesis(−3x + 13close parenthesis)³ + parenthesis(22x − 37close parenthesis)³ + parenthesis(59x − 89close parenthesis)³
  • 270x + 200 = parenthesis(3x + 259close parenthesis)³ + parenthesis(−3x − 254close parenthesis)³ + parenthesis(x + 62close parenthesis)³ + parenthesis(−x − 107close parenthesis)³
  • 270x + 218 = parenthesis(−3x − 56close parenthesis)³ + parenthesis(3x + 31close parenthesis)³ + parenthesis(−5x − 69close parenthesis)³ + parenthesis(5x + 78close parenthesis)³
  • 432x + 380 = parenthesis(−3x + 64close parenthesis)³ + parenthesis(3x − 80close parenthesis)³ + parenthesis(2x − 29close parenthesis)³ + parenthesis(−2x + 65close parenthesis)³
  • 540x + 38 = parenthesis(5x − 285close parenthesis)³ + parenthesis(−5x + 267close parenthesis)³ + parenthesis(3x − 140close parenthesis)³ + parenthesis(−3x + 190close parenthesis)³
  • 810x + 56 = parenthesis(5x − 755close parenthesis)³ + parenthesis(−5x + 836close parenthesis)³ + parenthesis(9x − 1445close parenthesis)³ + parenthesis(−9x + 1420close parenthesis)³
  • 1080x + 380 = parenthesis(−x − 1438close parenthesis)³ + parenthesis(x + 1258close parenthesis)³ + parenthesis(−3x − 4037close parenthesis)³ + parenthesis(3x + 4057close parenthesis)³
  • 1620x + 1334 = parenthesis(−5x − 3269close parenthesis)³ + parenthesis(5x + 3107close parenthesis)³ + parenthesis(−9x − 5714close parenthesis)³ + parenthesis(9x + 5764close parenthesis)³
  • 1620x + 1352 = parenthesis(−5x + 434close parenthesis)³ + parenthesis(5x − 353close parenthesis)³ + parenthesis(9x − 722close parenthesis)³ + parenthesis(−9x + 697close parenthesis)³
  • 2160x + 362 = parenthesis(−5x − 180close parenthesis)³ + parenthesis(5x + 108close parenthesis)³ + parenthesis(−6x − 149close parenthesis)³ + parenthesis(6x + 199close parenthesis)³
  • 6480x + 794 = parenthesis(−5x − 83close parenthesis)³ + parenthesis(5x + 11close parenthesis)³ + parenthesis(−6x − 35close parenthesis)³ + parenthesis(6x + 85close parenthesis)³

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

54x + 2 = parenthesis(29484x² + 2211x + 43close parenthesis)³ + parenthesis(−29484x² − 2157x − 41close parenthesis)³ + parenthesis(9828x² + 485x + 4close parenthesis)³ + parenthesis(−9828x² − 971x − 22close parenthesis)³

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.

Expressions

You can enter numbers or numeric expressions in the input box including parentheses. The operations supported are:

  • + for addition
  • - for subtraction
  • * for multiplication
  • / for integer division
  • % for remainder
  • ^ or ** for exponentiation
  • n!: factorial
  • p#: primorial (product of all primes less or equal than p).
  • B(n): Previous pseudoprime to n
  • F(n): Fibonacci number Fn
  • L(n): Lucas number Ln = Fn-1 + Fn+1
  • N(n): Next pseudoprime to n
  • P(n): Unrestricted Partition Number (number of decompositions of n into sums of integers without regard to order).

You can use the prefix 0x for hexadecimal numbers, for example 0x38 is equal to 56.

Source code

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

Written by Dario Alpern. Last updated 31 July 2016.