Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
reversed(range(min(succ(ceil(cbrt( solution in Clear category for Sum of Distinct Cubes by veky
from math import ceil, cbrt
sum_of_cubes = lambda n: next(socs(n, n + 1), None)
def socs(n, stop):
if not n: yield []
for i in reversed(range(min(1 + ceil(cbrt(n)), stop))):
for rest in socs(n - i**3, stop=i): yield [i, *rest]
July 29, 2023
Comments: