Help Needed

Joseph Biberstine jrbibers at indiana.edu
Sun Dec 31 18:54:39 CET 2006


I believe (based on the assumption that conjuncts are evaluated in order 
from left) if you don't put MemberQ as the first condition in the 
conjunct, you will gain nothing.  In fact, putting it last will make 
your script run slower.

Use this, if anything:
Do[If[
     MemberQ[{20, 40, 50, 100, 110, 160, 170, 190}, Mod[x, 210]] &&
       PrimeQ[x^16 + 1] &&
       PrimeQ[x^16 + 3] &&
       PrimeQ[x^16 + 7] &&
       PrimeQ[x^16 + 9],
     Print[x]], {x, 57171409, 58000000}]

Artur wrote:
> Mathematica Procedure can be for case mod 210 following:
> Do[If[(PrimeQ[x^16 + 1]) && (PrimeQ[x^16 + 3]) && (PrimeQ[x^16 + 7]) && \
> (PrimeQ[x^16 + 9]) && (MemberQ[{20, 40, 50, 100, 110, 160, 170, 190},
>       Mod[x, 210]]), Print[x]], {x, 57171409, 70171411}]
> ARTUR
> 
> Dnia 30-12-2006 o 17:34:45 Nick Hobson <nickh at qbyte.org> napisał(a):
> 
>>  20, 40, 50, 100, 110, 160, 170, or 190
> 
> 






More information about the SeqFan mailing list