OK, I haven't known about that group, now I'm a member of that also.

"I'm slightly confused. Isn't the first q of this form precisely q = 2p + 1?
If so, it cannot be as large as your limit."

See, we are searching for primes of the form q=2kp+1, if p is prime then it
isn't sure that 2p+1 is also prime, and if it is composite, then prod=1
remains, so we are still in the while loop, and we'll test q=4p+1 and so on.
If I find a prime then prod*=p will be true also. If prod>bound_for_p/p then
I'm exit from the while loop, I've found enough prime(s) for p (at least one
prime, however for small p more than one).

The following pari-gp code gives the first such q number:
f(p)=q=2*p+1;while(isprime(q)==0,q+=2*p);return(q)

for example f(97)=389, some "extreme" values:
f(5227)=397253, so p=5227, q=397253, for this: q=1.0368*p*log(p)^2
f(170167)=24504049, so q=0.9926*p*log(p)^2

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"mpir-devel" group.
To post to this group, send email to mpir-devel@googlegroups.com
To unsubscribe from this group, send email to 
mpir-devel+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/mpir-devel?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to