Everything2
Near Matches
Ignore Exact
Full Text
Everything2

Lucas-Lehmer test

created by Vorbis

(idea) by Vorbis (1.5 wk) (print)   ?   (I like it!) Fri Mar 26 2004 at 13:45:55

A primality test used to determine if a given number is a Mersenne prime.

Hmmm... the strings of random characters appearing in the chatterbox reveal that several readers have fallen asleep on their keyboards. If math doesn't do the trick, let's try greed:

this test can net you 100.000 $.

Now that I have your attention, let me explain.

A Mersenne prime is a number that can be expressed as M=2P-1.

How can you tell if M is prime for a given P? Well, if P is not prime, then M won't be prime either. For all the other cases just follow these steps (this works for every P>2):

  1. S0=4
  2. Sn=(Sn-12-2) modulo (2P-1)
  3. repeat step 2 until you get SP-2
  4. if SP-2 equals 0, M is prime

What? You want to know more about the money? Oh well...

Implement the algorithm in your favorite programming language. Choose P so that M will have more than 10 million digits. The Electronic Frontier Foundation offers an award to the discoverer of a ten million digit prime number.

(The catch is, state-of-the-art PCs will complete the test in about five months for any given P. The chances of M being prime are about 1 in 250.000. Still beats the lottery, though.)


printable version
chaos

Mersenne prime Electronic Frontier Foundation A new experimental protocol for observing the effects of the circumvolution of a preharvested murine specimen Multiplication using the Fast Fourier Transform
Nikhilam Navatashcaramam Dashatah number sense Primality Testing prime number
prime EFF Hate Fermat's little theorem
Vedic number bases Attention Number
greed Money Chatterbox lottery
modulo cobalt blue
Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.
  Epicenter
Login
Password

password reminder
register

Everything2 Help

Cool Staff Picks
Little presents from the Node Fairy:
Freelance Contract
This place needs more actual content. Let's begin.
éminence grise
Texas
A Sniper in Every Minaret
Thomas Jefferson's First Inaugural Address
Alfred Bester
The sexuality and marital status of Jesus
Shotgun
Glossary of Genetics terms
Sailing in the wake of my grandmother
Fred Rogers
Sugar daddy
New Writeups
BookReader
Fear the Cold(dream)
Pavlovna
Kathleen MacInnes(person)
stainedglass
1(fiction)
kalen
Three "T"s(idea)
octillion369
Undead(idea)
archiewood
Ico(fiction)
Heisenberg
Why I love Everything2(log)
octillion369
Death Knight(person)
XWiz
Are you hoping for a miracle?(review)
santo
The Host(review)
LostPsion
"Shut the Fuck Up" Theaters(idea)
beatrice
You've been slowly taking me over for nearly a year, do you know that?(idea)
Berek
YouTube(thing)
shaogo
How to Pretend to Have a Job(idea)
hapax
Les Provinciales(review)
This page courtesy of The Everything Development Company