I'm sorry for this kind of specific question, I'd love if you could link to resources (prime lists, etc) that can answer similar questions more generically.
What is the largest prime less than 2^31?
6
$\begingroup$
number-theory
prime-numbers
online-resources
-
0Mathematica should be able to answer this question quickly; it has a function that will tell you how many primes there are less than 2^{31} and another that tells you what the nth prime is. Use one, then the other. – 2010-11-12
-
0These are all great answers. Thank you everyone. – 2010-11-12
-
1@Qiaochu: A shortcut is `NextPrime[2^31,-1]`. – 2010-11-12
-
0...and it works on Wolfram Alpha too: http://www.wolframalpha.com/input/?i=NextPrime%5B2%5E31%2C-1%5D – 2010-11-12
2 Answers
5
http://www.prime-numbers.org/prime-number-2147480000-2147485000.htm tells you that it's 2147483647 (about 2/3rds of the way down, third column). This website seems like a good resource if you're looking for lots of primes.
-
0Thank you, that list was exactly what I needed. – 2010-11-12
12
It is $2^{31}-1$. You might want to check Mersenne prime for similar details.
-
0Interestingly this is one of the four known Mersenne double prime.http://en.wikipedia.org/wiki/Double_Mersenne_number – 2010-11-12
-
0The fact that this is a prime is taken advantage by pseudo random number generators on $32$ bit machines. – 2010-11-12
-
2The first proof of primality was given by Euler, and it remained the largest-known prime for nearly 100 years. – 2010-11-12
-
0Do you have a link to the proof @douglas? – 2010-11-12
-
2Here's Euler's proof: http://www.math.dartmouth.edu/~euler/pages/E461.html Although you might be more interested in the wikipedia page: http://en.wikipedia.org/wiki/2147483647 – 2010-11-12