| hermann on Mon, 16 Mar 2026 17:12:52 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: S-Unit questions |
On 2026-03-16 15:33, Kurt Foster wrote:
On Mar 14, 2026, at 4:38 AM, hermann@stamm-wilbrandt.de wrote:Below SageMath solver run for S={2,3} took less than 5 minutes.I tried with S={2,3,5,7} and aborted after 22.5h on AMD 7950X CPU with boost frequency 5.4GHz run.https://gist.github.com/Hermann-SW/b538c991c922b1e8fc06abbab554b3ef?permalink_comment_id=6027812#gistcomment-6027812 Then I tried with S={2,3,5} and aborted after 13.5h.To find small solutions to u + v = 1 in rational fractions with u, v S-units, I tried the following approach: First, generate a list of positive integers up to a limit (here, 1000)` that are factorable over S. Then find relatively prime pairs whose differences are also factorable over S. These lead to 3 formally different sets of solutions; only [2,-1] occurs more than once. I choose N as a product of powers of primes in S, so that each prime-power factor is as big as my size limit. Of course, there is no guarantee of finding all solutions. ... I tried S = {2,3,5,7}. There were quite a few solutions, with a few more showing up when I raised the limit from 1000 to 10,000.
Thanks Kurt, your code is really fast.
Even with S={2,3,5,7} and 10000 limit only 14ms:
? N=2^14*3^9*5^6*7^5;v=divisors(N);
? w=[];for(i=1,#v,if(v[i]<=10000,w=concat(w,[v[i]]),break))
?
for(i=1,#w-1,for(j=i+1,#w,if(gcd(w[i],w[j])==1,d=w[j]-w[i];if(N%d==0,s1=[w[i]/w[j],d/w[j]];s2=[w[j]/w[i],-d/w[i]];s3=[w[j]/d,-w[i]/d];print(s1",
"s2", "s3)))))
[1/2, 1/2], [2, -1], [2, -1] [1/3, 2/3], [3, -2], [3/2, -1/2] [1/4, 3/4], [4, -3], [4/3, -1/3] ... [2400/2401, 1/2401], [2401/2400, -1/2400], [2401, -2400] [4374/4375, 1/4375], [4375/4374, -1/4374], [4375, -4374] ? ## *** last result: cpu time 14 ms, real time 14 ms. ? Regards, Hermann.