Jean-Marie Madiot on Mon, 11 Jun 2012 15:37:32 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Set prime limit


> default(parisize)
> default(primelimit)
> default(parisize,12345678)
> default(primelimit,12345678)

Wow, thanks a lot, John and Bill. I didn't know this command.

> We added this feature in the development branch, so now you can do:
> ? forprime(p=2^100,,if(p%123==1,return(p)))
> %2 = 1267650600228229401496703208451

Great! (And I discover return(p), life is good)

> It is advised to use nextprime instead of isprime for this purpose, this is
> slightly faster.

I did not attempt that, I thought that it would have needed the
precomputation (as forprime).

Perfect, thank you.

Jean-Marie