| hermann on Thu, 12 Mar 2026 21:56:29 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: S-Unit questions |
On 2026-03-12 16:09, hermann@stamm-wilbrandt.de wrote:
Never used SageMath before, and it took many iterations with Gemini to get error free code.The number of solutions to S-Unit equation (u+v=1, u,v S-Units) https://en.wikipedia.org/wiki/S-unit#S-unit_equationis finite. That section also says such a solver can be found here, I will try:https://en.wikipedia.org/wiki/SageMath
I changed to use ℚ instead of ℚ(i) and added generator output: https://gist.github.com/Hermann-SW/b538c991c922b1e8fc06abbab554b3efhermann@7950x:~$ time Downloads/SageMath-10.8-x86_64.AppImage S-Unit.sol.sage
Generators: -1 2 3 Found 11 solutions: 2 + -1 == 1 -------------------- -1/8 + 9/8 == 1 -------------------- 1/9 + 8/9 == 1 -------------------- 3 + -2 == 1 -------------------- 4 + -3 == 1 -------------------- 3/4 + 1/4 == 1 -------------------- 1/3 + 2/3 == 1 -------------------- 4/3 + -1/3 == 1 -------------------- -1/2 + 3/2 == 1 -------------------- -8 + 9 == 1 -------------------- 1/2 + 1/2 == 1 -------------------- real 4m45.409s user 4m46.018s sys 0m0.187s hermann@7950x:~$ Regards, Hermann.