In a message dated 1/23/2009 9:12:19 P.M. Eastern Standard Time,
[email protected] writes:
That is not the point of lucas-lehmer. The point is to determine
whether or not 2^p - 1 is a prime number more quickly than ... say
checking for divisibility by primes up to sqrt(2^p - 1).
OK, I stand corrected. But what if 2**p-1 is huge, will this function
really save significant processing time?
Also, I used this predicate method as follows:
for p in range(3,10000,2):
if lucas_lehmer(p):
print p, 2**p-1.
On this range of odds from 3 to 10000, p was always prime, and all prime
numbers p gave 2**p-1 prime. I thought that if 2**p-1 is prime, then p is
prime, but not all prime values of p will give 2**p-1 prime.
HTH,
A. Jorge Garcia
[email protected]
http://calcpage.tripod.com
Teacher & Professor
Applied Mathematics, Physics & Computer Science
Baldwin Senior High School & Nassau Community College
**************A Good Credit Score is 700 or Above. See yours in just 2 easy
steps!
(http://pr.atwola.com/promoclk/100000075x1215855013x1201028747/aol?redir=http://www.freecreditreport.com/pm/default.aspx?sc=668072%26hmpgID=62%26bcd=De
cemailfooterNO62)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-edu" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-edu?hl=en
-~----------~----~----~----~------~----~------~--~---