Denis Simon on Thu, 13 Feb 2025 21:34:39 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: How to find a solution to this equation so the result is a postive perfect square ? |
A possibility to get positive solutions is to choose Y first, randomly, smaller than the square root of N. Then Z = lift(Mod(Y/s,a)) X = -(Y^2-N*Z^2)/a; This will only work if s is coprime to a, or equivalently if N is coprime to a. Denis SIMON. ----- Mail original ----- > De: "Laël Cellier" <lael.cellier@laposte.net> > À: "pari-users" <pari-users@pari.math.u-bordeaux.fr>, "Denis Simon" <denis.simon@unicaen.fr> > Envoyé: Jeudi 13 Février 2025 20:28:56 > Objet: Re: How to find a solution to this equation so the result is a postive perfect square ? > Bon soir, > > sorry. I recognize this wasn’t clear beside the square of a negative > integer is always positive (-Y²=Y² always). But I want positive integers > as solution to the equation… It seems your proposal will always lead to > negative perfect squares whereas the first example show positive > solutions can exists… > > Cordialement,