Bill Allombert on Fri, 17 Nov 2023 11:39:51 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Question on ternary quadratic form


On Fri, Nov 17, 2023 at 12:10:07AM +0100, hermann@stamm-wilbrandt.de wrote:
> On 2023-11-16 23:28, Bill Allombert wrote:
> > 
> > If you want all the solutions, no, there are too many of them.
> > If you need only one solution, you can use my script
> > <https://pari.math.u-bordeaux.fr/Scripts/foursquares.gp>
> > 
> > Cheers,
> > Bill.
> > 
> I think your "threesquares()" in that script is faster than American
> Citizen's code.
> 
> 
> But I determined sum of 4 squares for Mersenne primes M_p=2^p-1
> (they do not have sum of 3 squares representation).
> 
> Your "foursquares()" takes 21ms for M_1279.
> But I had to stop it after more than an hour for M_2203 on i7-11850H CPU.

This is strange, do you have the latest version ?

? foursquares(2^1279-1)
time = 12 ms.
? foursquares(2^2203-1)
time = 31 ms.
? foursquares(2^9689-1)
time = 684 ms.

Cheers,
Bill.