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 <calcp...@aol.com> wrote: > > 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 > > where SAGE outputs: > p=1279 > 2^p-1= > 104079321946643990819252403273640855386152622472667048053191123504036080\ > 596733602980122394417323241848424216139542810077913835662483234649081399\ > 066056773207629241295093892203457731833496615835504729594205476898112116\ > 936771475484788669625013844382602917323488853111608285384165850282556046\ > 662248318909188018470682222031405210266984354887329580288780508697361869\ > 007147207105557031687290871279104079321946643990819252403273640855386152\ > 622472667048053191123504036080596733602980122394417323241848424216139542\ > 810077913835662483234649081399066056773207629241295093892203457731833496\ > 615835504729594205476898112116936771475484788669625013844382602917323488\ > 853111608285384165850282556046662248318909188018470682222031405210266984\ > 35488732958028878050869736186900714720710555703168729087 > > Wikipedia's method is not equivalent to the one given at the beginning > of this thread is it? > > TIA, > A. Jorge Garcia > calcp...@aol.com > http://calcpage.tripod.com > > Teacher & Professor > Applied Mathematics, Physics & Computer Science > Baldwin Senior High School & Nassau Community College > > > -- William Stein Associate Professor of Mathematics University of Washington http://wstein.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sage-edu" group. To post to this group, send email to sage-edu@googlegroups.com To unsubscribe from this group, send email to sage-edu+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-edu?hl=en -~----------~----~----~----~------~----~------~--~---