PARI code analyzing whether given integer is presentable as sum of two integer squares
Max Alekseyev
maxale at gmail.com
Thu Nov 22 09:50:27 CET 2007
On Nov 21, 2007 10:23 PM, victor miller <victorsmiller at gmail.com> wrote:
> Anyway, to answer your question: in late 1992, Victor Miller posted
> the following one-liner:
>
> fermat(p) = lllint([lift(sqrt(Mod(-1,p))),p;1,0])[1,]
In modern PARI/GP versions lllint(x) and mod(x,y) have been replaced
with qflll(x,1) and Mod(x,y) respectively.
So, this one-liner should be updated to:
fermat(p) = qflll([lift(sqrt(Mod(-1,p))),p;1,0],1)[1,]
Max
More information about the SeqFan
mailing list