Bill Allombert on Tue, 10 Oct 2023 00:56:42 +0200


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

Re: efficient foursquare() and/or threesquare1m4() functions


On Mon, Oct 09, 2023 at 12:17:45PM +0200, hermann@stamm-wilbrandt.de wrote:
> On 2023-10-08 18:38, Bill Allombert wrote:
> > 
> > I join a script that should handle all cases.
> > (two/three/four squares with or without factorization, except
> > for two squares without factoring, which I do not know how to do.)
> > 
> Thanks, small typo:
> ...
> fouresquares_fact(n)=abs(qfsolve(matdiagonal([1,1,1,1,-n]))[1..4])~
> ...
> 
> needs to be "...foursquares_fact...".

Ah sorry... I have made a new version. I put the GP script at 
<https://pari.math.u-bordeaux.fr/Scripts/foursquares.gp>
so that I do not need to spam the list even more.

Cheers,
Bill.