This discussion should be on sage-nt, the list for sage number theory
discussion:
http://groups.google.com/group/sage-nt
On Mon, Jan 26, 2009 at 4:51 PM, A. Jorge Garcia wrote:
>
> OK, there's another error. The lucas_lehmer() method above was from
> the sage docs.
>
> Wikipedia actually has:
OK, there's another error. The lucas_lehmer() method above was from
the sage docs.
Wikipedia actually has:
def is_prime_lucas(p):
s=Mod(4, 2^p-1)
for i in range(3, p+1):
s = s^2-2
return s == 0
for p in range(1000,2000):
if is_prime_lucas(p):
print p, 2^p-1
wher