[seqfan] Re: Strange error in PARI/GP

Sean A. Irvine sairvin at gmail.com
Wed May 18 21:03:20 CEST 2016


Hi Felix,

I tried your function and do not get the error, so it must be specific to
your version or install.

GP/PARI CALCULATOR Version 2.7.5 (released)
amd64 running linux (x86-64/GMP-6.0.0 kernel) 64-bit version

? isleastnonwiefpsp(n, b) = if(Mod(b, n^2)^(n-1)==1,
return(0),forcomposite(c=1, n-1, if(Mod(n, c^2)^(c-1)!=1, return(0))),
return(1))
%1 =
(n,b)->if(Mod(b,n^2)^(n-1)==1,return(0),forcomposite(c=1,n-1,if(Mod(n,c^2)^(c-1)!=1,return(0))),return(1))
? isleastnonwiefpsp(8, 12)
%2 = 0

Sean.


On 19 May 2016 at 02:08, Felix Fröhlich <felix.froe at gmail.com> wrote:

> Dear Sequence fans,
>
> I wrote the following PARI function
>
> isleastnonwiefpsp(n, b) = if(Mod(b, n^2)^(n-1)==1, return(0),
> forcomposite(c=1, n-1, if(Mod(n, c^2)^(c-1)!=1, return(0))), return(1))
>
> When I try to execute this function, I get a strange error. For example,
> when I execute the following function call
>
> isleastnonwiefpsp(8, 12)
>
> I get the error
>
> _multi_if: bug in PARI/GP (Segmentation fault), please report.
>
> Any ideas what the problem is here?
> Felix
>
> --
> Seqfan Mailing list - http://list.seqfan.eu/
>



More information about the SeqFan mailing list