Re: How to find a solution to this equation so the result is a perfect square ?

Denis Simon <[email protected]>
Newsgroups gmane.comp.mathematics.pari.user
Message-ID <[email protected]>
Indeed, I forgot a - sign in the expression for X.
You can try:

Y = lift(Mod(s*Z,a));
X = -(Y^2-N*Z^2)/a;

Denis SIMON.

----- Mail original -----
> De: "Laël Cellier" <[email protected]>
> À: "pari-users" <[email protected]>, "Denis Simon" <[email protected]>
> Envoyé: Jeudi 13 Février 2025 17:47:40
> Objet: Re: How to find a solution to this equation so the result is a perfect square ?

> Ok, I understand what you wrote, but it doesn’t always works :
> 
> let’s take a=2032123 and N=1837527 and Z=3. A square root of N mod a is
> s=1214464.
> Following your code this gives Y=1611269 and X=1277566.
> 
> If we apply so those number we get
> ((1611269^2)+(1277566*2032123))/1837527= 179046863551/63363 which
> obviously isn’t a perfect square…
> 
> Cordialement,
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.