{"id":20028939,"url":"https://github.com/fleschutz/lss","last_synced_at":"2026-03-06T07:31:56.199Z","repository":{"id":64327966,"uuid":"210580347","full_name":"fleschutz/LSS","owner":"fleschutz","description":"C program to calculate solutions for sums of three cubes: x³ + y³ + z³ = n","archived":false,"fork":false,"pushed_at":"2025-10-27T09:24:49.000Z","size":3362,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-27T11:32:15.437Z","etag":null,"topics":["cubes","diophantine","equation","simple","solutions","sum","three"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fleschutz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-09-24T10:56:15.000Z","updated_at":"2025-10-27T09:24:53.000Z","dependencies_parsed_at":"2023-12-03T11:23:42.267Z","dependency_job_id":"c8b3193d-67a0-4731-9c10-3f13cb14a477","html_url":"https://github.com/fleschutz/LSS","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/fleschutz/LSS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fleschutz%2FLSS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fleschutz%2FLSS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fleschutz%2FLSS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fleschutz%2FLSS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fleschutz","download_url":"https://codeload.github.com/fleschutz/LSS/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fleschutz%2FLSS/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30165622,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T04:43:31.446Z","status":"ssl_error","status_checked_at":"2026-03-06T04:40:30.133Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cubes","diophantine","equation","simple","solutions","sum","three"],"created_at":"2024-11-13T09:17:14.833Z","updated_at":"2026-03-06T07:31:56.143Z","avatar_url":"https://github.com/fleschutz.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"Sums-of-Three-Cubes Solver\n==========================\nThis repo contains a C program to list simple solutions (LSS) for the equation: **x³ + y³ + z³ = n**\n\nThe sums of three cubes is a hard math problem, see https://en.wikipedia.org/wiki/Sums_of_three_cubes and https://en.wikipedia.org/wiki/Diophantine_equation for details. For a C# program please visit: https://github.com/mill1/SumOfThreeCubesSolver.\n\n\n🔧 Installation\n----------------\nRequires a **C/C++ compiler** only. Then execute in a terminal window: \n```\n\u003e git clone https://github.com/fleschutz/LSS  # or download and unzip the ZIP file (click green button)\n\u003e cd LSS\n\u003e cc -O3 -fopenmp main.c -o mode              # compiles with OpenMP API for multi-threading\n\u003e ./mode \u003cNUMBER\u003e                             # replace \u003cNUMBER\u003e by the mode number (see below)\n```\n\nMode 1 - Calculate a solution for x,y,z\n---------------------------------------\nThis mode calculates the result of: x³ + y³ + z³ for the given values of x, y, z. Note the following examples:\n\n* `./mode 1  1 2 3` returns: 1³ + 2³ + 3³ = 36\n* `./mode 1 -80538738812075974 80435758145817515 12602123297335631` returns: -80538738812075974³ + 80435758145817515³ + 12602123297335631³ = 42\n\n\nMode 2 - List no solutions\n--------------------------\nThis mode calculates and lists all non-existing solutions. No solution exists for: n equal 4 or 5 modulo 9.\n\n`./mode 2` returns: [no_solutions.txt](Solutions/no_solutions.txt). This mode uses the listNoSolutions() function and took 0.116s on a Core i9.\n\n\nMode 3 - List all solutions for positive x,y,z\n----------------------------------------------\nThis mode calculates and lists all solutions for x \u003e= 0, y \u003e= 0, and z \u003e= 0.\n\n`./mode 3` returns: [solutions_for_positive_xyz.txt](Solutions/solutions_for_positive_xyz.txt) (for readability the file has been numerically sorted by executing: `sort -g \u003c infile \u003e outfile`). It uses the listSolutionsForPositiveXYZ() function and took 0.037s on a Core i9. \n\n\nMode 4 - List trivial solutions for negative z\n----------------------------------------------\nThis mode calculates and lists trivial solutions for z \u003c 0.\n\n`./mode 4` returns: [solutions_for_negative_z.txt](Solutions/solutions_for_negative_z.txt). It uses the listSolutionsForNegativeZ() function and took 10s on a Core i9. \n\n\nMode 5 - List trivial solutions for negative y and z\n----------------------------------------------------\nThis mode calculates and lists trivial solutions for y \u003c 0 and z \u003c 0.\n\n`./mode 5` returns: [solutions_for_negative_yz.txt](Solutions/solutions_for_negative_yz.txt). It uses the listSolutionsForNegativeYZ() function and took 4h on a Core i9.\n\n\nMode 6 - List trivial solutions\n-------------------------------\nThis mode combines mode 2 + 3 + 4 + 5.\n\n`./mode 6` returns: [trivial_solutions.txt](Solutions/trivial_solutions.txt) and took 4h on a Core i9.\n\n\nMode 7 - List nontrivial solutions\n----------------------------------\nThis mode calculates and lists nontrivial solutions for a given value range of x. The value range is defined by an exponent, e.g. exponent 6 means: x=[10^6..10^7].\n\nIt uses a 'shotgun' algorithm in the listNontrivialSolutions() function. \n\n* `./mode 7 3` returns: [solutions_for_x_greater_10^3.txt](Solutions/solutions_for_x_greater_10^3.txt) (took 0.042s on a Core i9).\n* `./mode 7 4` returns: [solutions_for_x_greater_10^4.txt](Solutions/solutions_for_x_greater_10^4.txt) (took 3.4s on a Core i9).\n* `./mode 7 5` returns: [solutions_for_x_greater_10^5.txt](Solutions/solutions_for_x_greater_10^5.txt) (took 5min 23s on a Core i9).\n* `./mode 7 6` returns: [solutions_for_x_greater_10^6.txt](Solutions/solutions_for_x_greater_10^6.txt) (took 2h on a Core i9).\n* `./mode 7 7` returns: [solutions_for_x_greater_10^7.txt](Solutions/solutions_for_x_greater_10^7.txt) (took 13h on a Core i9).\n* `./mode 7 8` returns: [solutions_for_x_greater_10^8.txt](Solutions/solutions_for_x_greater_10^8.txt) (not finished yet).\n* `./mode 7 9` returns: [solutions_for_x_greater_10^9.txt](Solutions/solutions_for_x_greater_10^9.txt) (not finished yet).\n* `./mode 7 10` returns: [solutions_for_x_greater_10^10.txt](Solutions/solutions_for_x_greater_10^10.txt) (not finished yet).\n* `./mode 7 11` returns: [solutions_for_x_greater_10^11.txt](Solutions/solutions_for_x_greater_10^11.txt) (not finished yet).\n* `./mode 7 12` returns: [solutions_for_x_greater_10^12.txt](Solutions/solutions_for_x_greater_10^12.txt) (not finished yet).\n\n\n🏆 Nontrivial Solutions\n------------------------\nThe following nontrivial solutions have been solved already in the past:\n\n* **30** = *3982933876681³ + (-636600549515)³ + (-3977505554546)³* (solved 1999 by Beck, Pine, Tarrant, and Yarbrough Jensen)\n* **33** = *88661289752875283³ + (-87784054428622393)³ + (-27361114688070403)³* (solved 2019 by Andrew Booker)\n* **42** = *(-80538738812075974)³ + 80435758145817515³ + 12602123297335631³* (solved 2019 by Andrew Booker and Andrew Sutherland)\n* **52** = *60702901317³ + 23961292454³ + (-61922712865)³* (solved by ?)\n* **74** = *(-284650292555885)³ + 66229832190556³ + 283450105697727³* (solved 2016 by Sander G. Huisman)\n* **165** = *(-385495523231271884)³ + 383344975542639445³ + 98422560467622814³* (solved by ?)\n* **795** = *(-14219049725358227)³ + 14197965759741573³ + 2337348783323923³* (solved by Andrew Booker)\n* **906** = *(-74924259395610397)³ + 72054089679353378³ + 35961979615356503³* (solved by Andrew Booker)\n\nUse [WolframAlpha](https://www.wolframalpha.com) to verify the solutions or execute: `./mode 1 x y z` (copy\u0026paste recommended). The only remaining unsolved cases up to 1,000 are the following seven numbers:\n\n* **114** = ?\n* **390** = ?\n* **627** = ?\n* **633** = ?\n* **732** = ?\n* **921** = ?\n* **975** = ?\n\nWant to get famous? Just solve one of these numbers. May the force be with you 🖖\n\n\n📧 Feedback\n------------\nSend your email feedback to: markus.fleschutz [at] gmail.com\n\n\n🤝 License \u0026 Copyright\n-----------------------\nThis open source project is licensed under the CC0 license. All trademarks are the property of their respective owners.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffleschutz%2Flss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffleschutz%2Flss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffleschutz%2Flss/lists"}