This question already has an answer here:

I want to know, what is the largest prime number? I know prime numbers are whole numbers that cannot be divided by any whole number except 1 and themselves, I also know some primes like 2, 3, 5, 7, 11... But what is the largest prime number?

marked as duplicate by user61527, Grigory M, Davide Giraudo, M Turgeon, Andrés E. Caicedo May 17 '14 at 21:38

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 14
    There isn't one. – Ayman Hourieh May 17 '14 at 18:52
  • 2
    You'll find that assuming there is a biggest anything is a bad idea in math. – user2357112 May 17 '14 at 19:31
  • I saw at least 4 upvotes for this question at one point. Does anyone care to elaborate why they think this question deserves to be upvoted? – user2566092 May 17 '14 at 20:19
  • @user2566092: On SO we have come to the conclusion that these kinds of upvotes are from the same kinds of users that would also ask this kinds of questions. They simply think "oh, I always wanted to know that too" – PlasmaHH May 17 '14 at 20:21
  • Exact duplicate of: Is there possibly a largest prime number?. – Hakim May 29 '14 at 14:02

There is no largest prime number, since there are infinitely many prime numbers as proved by Euclid back to 300BC. However, there is a largest known prime which is: $$2^{57885161}-1 $$ as of January 2014, discovered by the GIMPS project. You can even help find a new one, by following the simple steps described here and letting your computer do the job.

When you try to catch the latest prime number:

(づ。◕‿‿◕。)づ $\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 53$

Another one appears behind you

$59 \ \ \ \ \ \ \ \ \ \ \ \ $ (づ。◕‿‿◕。)づ $\ \ \ \ \ \ \ \ \ \ \ \ 53$

They're infinite!

Euler proved it with the zeta function:

$$\zeta(s) = \sum_{n=1}^\infty \frac{1}{n^s} = \prod_{p}^\infty \frac{1}{(1-\frac{1}{p^s})}\tag{$p$ is a prime}$$

  • 1
    Haha made me smile :) – Prism May 18 '14 at 16:59
  • @Prism thanks, that was the intention :) – Lucas Zanella May 18 '14 at 19:46
  • 6
    The zeta function is a bit of an overkill.... – user3217013 May 20 '14 at 16:55

I would like to provide a little more detail and offer the proof for the infinitude of the primes. Suppose that there was a last prime number. If we numbered the primes, we'd have $p_1$, $p_2$ and so on until the last one which we'll call $p_k$.

We now consider the product of all of these prime numbers plus 1. $n=p_1p_2p_3\cdots p_k+1$. To check to see if a number is prime, it suffices to divide by all prime numbers smaller than it, so if we divide out any of the primes, maybe $p_i$ for all $i$ between $1$ and $k$, we would have then ${p_1p_2\cdots p_{i-1}p_ip_{i+1}\cdots p_k$+1} \over p_{i}$. We could simplify this term then to include a product of primes on the left, cancelling out $p_i$, but then we would still have the last term $1\over{p_i}$, which is not an integer since $p_i$ is greater than 1. But that means that $n$ was not divisible by $p_i$. Since $i$ was any arbitrary positive integer less than or equal to $k$, $n$ is not divisible by any of the primes smaller than itself, so $n$ too is prime, contradicting the idea of a last prime.

So we conclude their are infinitely many primes.

  • 1
    This isn't the best way to do it. Instead of assuming in advance that there are only finitely many, just say you have some finite set of primes, for example $\{2,7,43,101\}$. Show that if you multiply them and add $1$, then the prime factors of the resulting number are not within the finite set you started with. Thus every finite set of primes can be extended to a larger finite set of primes. There are disadvantages of rearranging this argument into a proof by contradiction. – Michael Hardy May 20 '14 at 16:46
  • This is pretty much Euclid's proof, as I understand it. Can you share some of the disadvantages of using a contradiction? To me it looks the same, but I'd love to hear your reasoning. – Alfred Yerger May 27 '14 at 14:45
  • 1
    Euclid's proof is indeed that described by my comment above. It can be rearranged into a proof by contradiction, and many authors do that, and many, even respectable ones, including no less than Dirichlet, assert falsely that that is what Euclid did. Among the disadvantages of doing that are that some authors then write that since $1+\prod S$ is not divisible by any primes in the finite set $S$, which was assumed to be the set of all primes, it follows that that number is not divisible by any primes, and therefore prime itself. It is then mistakenly thought by some that [.....] – Michael Hardy May 27 '14 at 21:17
  • 1
    ...that it was proved that $1+\prod S$, where $S$ is the set of the first $n$ primes, it always prime itself. But that is false: in many cases it is composite, in particular when $n=6$, since $30031=59\times509$. Only the assumption that a certain set contains all primes makes anyone say that if a number is not divisible by any primes in that set, then it is not divisible by any primes. And only that conclusion makes anyone conclude that it is therefore prime itself. Among the consequences are (1) an erroneous proposal to prove the twin-prime conjecture by..... – Michael Hardy May 27 '14 at 21:20
  • 1
    looking at $\pm1+\prod S$, where $S$ is the set of the first $n$ primes, and saying those two numbers are twin primes; (2) noticing that there are many counterexamples to the primality of $1+\prod S$, where $S$ is the set of the first $n$ primes, and falsely concluding that therefore Euclid's proof is simply mistaken; (3) mistakenly thinking Euclid's proof is non-constructive since it proves existence by contradiction. – Michael Hardy May 27 '14 at 21:22

The largest prime we know till now, is $2^{57885161}-1$


There is no biggest prime. Its just that we currently don't know what is the next biggest prime, but there is one!

  • That's a strange numbering system you're using! Does it mean the same as $2^{57885161}$? If not, you will have to argue it out with حكيم الفيلسوف الضائع. – TonyK May 17 '14 at 19:07
  • 4
    It would be prettyy important to note that there's no largest prime number, only that prime number is the largest we currently know of. – Alice Ryhl May 17 '14 at 19:11
  • That was a mistake, edited! – Vivek May 17 '14 at 19:11
  • Yup, I agree @Darksonn – Vivek May 17 '14 at 19:12
  • Yes, it mean the same @TonyK – Vivek May 17 '14 at 19:28

Not the answer you're looking for? Browse other questions tagged or ask your own question.