PARI code analyzing whether given integer is presentable as sum of two integer squares

Alexander Povolotsky apovolot at gmail.com
Thu Nov 22 16:58:26 CET 2007


Yes Artur - Thanks !

The procedure in A125084 is indeed useful.

 (PARI) isA125084(n)={ local(cnt, a, b) ; cnt=0 ; a=0; while(a^2<=n,
b=0 ; while(b<=a && a^2+b^2<=n, if(issquare(n-a^2-b^2), return(1) ) ;
b++ ; ) ; a++ ; ) ; return(0) ; }

I didn't find it myself. - sorry for disturbance !


Thanks again,
Alex
=============================================================
On Nov 22, 2007 10:41 AM, Artur <grafix at csl.pl> wrote:
> Mayby will be usefull procedure in Pari  from A125084
> <http://www.research.att.com/%7Enjas/sequences/A125084>
> or Mathematica Procedures from A124966
> <http://www.research.att.com/%7Enjas/sequences/A124966> A124971
> <http://www.research.att.com/%7Enjas/sequences/A124971> A125084
> <http://www.research.att.com/%7Enjas/sequences/A125084>
> BEST WISHES
> ARTUR
>
>
> Maximilian Hasler pisze:
> > see also: "sum of 2 squares" on
> > http://groups.google.ca/group/sci.math/browse_frm/thread/f4e21841bc8bb355
> >
> > M.H.
> >
> > __________ NOD32 Informacje 2678 (20071122) __________
> >
> > Wiadomosc zostala sprawdzona przez System Antywirusowy NOD32
> > http://www.nod32.com lub http://www.nod32.pl
> >
> >
> >
> >
>





More information about the SeqFan mailing list