Most interesting mathematics mistake? Some mistakes in mathematics made by extremely smart and famous people can eventually lead to interesting developments and theorems, e.g. Poincaré's 3d sphere characterization or the search to prove that Euclid's parallel axiom is really necessary unnecessary.
But I also think there are less famous mistakes worth hearing about. So, here's a question:

What's the most interesting mathematics mistake that you know of?

EDIT: There is a similar question which has been closed as a duplicate to this one, but which also garnered some new answers. It can be found here:
Failures that lead eventually to new mathematics
 A: Kempe's "proof" of the four-color theorem, which didn't prove the four-color theorem, but did:


*

*Prove the five-color theorem

*Somehow manage to go unnoticed for a dozen years

*Lay the foundations for major tools in structural graph theory, and despite being fundamentally flawed, serve as the starting point for the eventual successful proof(s) of 4CT.

A: Then there's always the Martian Climate Orbiter Newtons vs Pounds of thrust embarrassment.
A: For surfaces of constant mean curvature, it is alleged that Hopf thought that all compact CMC surfaces in $\mathbb{R}^3$ were round spheres.  CMC surfaces are what you get if you have a soap film bounding a fixed volume, so after a childhood full of blowing bubbles this is a pretty reasonable thing to think.  And it even happens to be mostly true: Hopf proved that immersed CMC spheres are round, and Alexandrov proved with a nice reflection argument that embedded CMC surfaces of any genus must actually be round spheres.
But a bit later, Wente discovered a collection of CMC tori.  Ivan Sterling has some nice pictures of these on his website, as does MSRI.  There are many very pretty connections between these surfaces and algebraic geometry, so to me they sort of mark the start of the modern "integrable systems" era of CMC research.
I should probably add that nobody actually seems sure if Hopf believed that compact CMC surfaces are spheres, but it makes a good creation story for the subfield!
A: Euler conjectured that there were no pairs of orthogonal Latin squares for orders $n \equiv 2 (\text{mod}~ 4)$.  Nearly two hundred years later, this was proved false for every $n \equiv 2 (\text{mod}~ 4)$ except $ 2 $ and $ 6 $.  Here's the link to Euler's paper.  Regardless, Euler's work certainly helped spur research into Latin squares.
A: A wonderful mistake, which paved the way to singular cardinals, was done by Felix Bernstein in his dissertation. I learnt this from Menachem Kojman. Berstein thought he had proved that for every ordinal $\alpha$, $\aleph_\alpha^\omega=\aleph_\alpha \cdot 2^{\aleph_0}$. This is true for every $\alpha < \omega$ but already fails for $\alpha=\omega$. Berstein's mistake was to assume that every cardinal has an immediate predecessor.
Kőnig later used Berstein's result to prove that the continuum is not an aleph, thus disproving at once two of Cantor's main beliefs: 1) every set can be well-ordered and 2) the continuum hypothesis! He presented his result at the third International Congress of Mathematicians in Heidelberg in 1904 and the organizers cancelled all parallel session to allow all participants (which included Cantor and Hilbert) to attend Kőnig's lecture. And his discovery was even reported in the local news!
Here is Kőnig's reasoning:
First he proves the correct result that for every ordinal $\beta$, $\aleph_{\beta+\omega}^\omega>\aleph_{\beta+\omega}$ (a special case of what is now known as Kőnig's Theorem). He then reasons that if the continuum were an aleph, say $2^{\aleph_0}=\aleph_\beta$, then substituting $\alpha=\beta+\omega$ into Berstein's result one obtains that $\aleph_{\beta+\omega}^\omega=\aleph_{\beta+\omega} \cdot 2^{\aleph_0}=\aleph_{\beta+\omega}$, which is a contradiction!
A: It was "proved" in 1961 that the first right derived functor, $\lim^1_{\leftarrow}$ of the inverse limit functor is zero on Mittag-Leffler systems.
However, recently a counter-example was found by Neeman and Deligne:

*

*Neeman, A. A counterexample to a 1961 “theorem” in homological algebra, Invent. math. 148, 397–420 (2002). doi:10.1007/s002220100197, pdf from the IAS
A: A story I heard in grad school: 
Once upon a time, a set theorist was writing a paper on inner models, and in it he wrote, "... and we will call such models nice."  When he got his manuscript back from the typist (this was back in the pre-LaTeX days of technical typists), he saw that his handwriting had been misread, and the line came out as: "... and we will call such models mice."  The name stuck, and to this day if you browse almost any recent volume of the Journal of Symbolic Logic, you will find set theory articles on "mice."
A: Something I came across a long time ago during my years in Oxford. A bit off a tangent, but still worth a quick read:
http://eprints.maths.ox.ac.uk/104/1/balls.pdf (Wayback Machine)
"If I remember rightly, cos(pi/2) = 1"
A: Maybe it's not true, but there's the story of the "Grothendieck prime":

One striking characteristic of Grothendieck's mode of thinking is that it seemed to rely so little on examples. This can be seen in the legend of the so-called "Grothendieck prime". In a mathematical conversation, someone suggested to Grothendieck that they should consider a particular prime number. "You mean an actual number?" Grothendieck asked. The other person replies, yes, an actual prime number. Grothendieck suggested, "All right, take 57."
But Grothendieck must have known that 57 is not prime, right? Absolutely not, said David Mumford of Brown University. "He doesn’t think concretely."

from here: http://www.ams.org/notices/200410/fea-grothendieck-part2.pdf
A: If Hilbert's program was a "mistake", then surely so was Russell-Whitehead's Principia Mathematica.
A: From Wikipedia (https://en.wikipedia.org/wiki/Uniform_convergence), about uniform convergence:
"Augustin Louis Cauchy in 1821 published a faulty proof of the false statement that the pointwise limit of a sequence of continuous functions is always continuous. Joseph Fourier and Niels Henrik Abel found counter examples in the context of Fourier series. Dirichlet then analyzed Cauchy's proof and found the mistake: the notion of pointwise convergence had to be replaced by uniform convergence."
A: An insignificant mistake, but amusing nonetheless: in Cayley's famous 1854 paper where he defines the concept of an abstract group, as an illustration he proves that there are three groups of order 6 (up to isomorphism). This is because he does not realize that the groups $Z_2\times Z_3$ and $Z_6$ are isomorphic. 
This is found on page 51 of A. Cayley, Desiderata and suggestions: No. 1. The theory of groups, American J. Math. 1 (1878), 50-52. An interesting related paper is G. A. Miller, Contradictions in the literature of group theory, American Math. Monthly 29 (1922), 319-328.
A: Poincare defined the fundamental group and the homology groups and proved that $H_1$ was $\pi _1$ abelianized. So the question came up whether there were other groups $\pi_n$ whose abelianization would give the $H_n$. Cech defined the higher $\pi_n$ as a proposed answer and submitted a paper on this. But Alexandroff and Hopf got the paper, proved that the higher $\pi_n$ were abelian and thus not the solution, and they persuaded Cech to withdraw the paper. Nevertheless a short note appeared and the $\pi_n$ started to be studied anyway...
Taken from http://www.intlpress.com/hha/v1/n1/a1/ ,page 17 
A: Frege's proposed axioms in Die Grundgesetze der Arithmetik.
Frege was trying to derive the concept of "number" from more basic concepts, and he tried to axiomatize higher-order logic (essentially, a kind of set theory), but his intuitive-seeming axioms were logically inconsistent.  Russell first found the inconsistency, which we now call Russell's Paradox.
In fairness to Frege, he was suspicious of his flawed axiom, before Russell wrote to him about his paradox. In the introduction he writes:

"If we find everything in order, then we have accurate knowledge of
  the grounds upon which each individual theorem is based. A dispute can
  arise, so far as I can see, only with regard to my Basic Law
  concerning courses-of-values (V), which logicians perhaps have not yet
  expressly enunciated, and yet is what people have in mind, for
  example, where they speak of the extensions of concepts."

A: Certainly  not the most interesting mistake in math, but
it deserves to be mentioned.
Hesse claimed that homogeneous polynomials in $n$ variables with vanishing Hessian are, after a linear change of coordinates, polynomials in at most $n-1$ variables.
Gordan and M. Noether verified Hesse's claim for $n\le3$ and
constructed counter-examples for every $n\ge4.$
It is ironic that there is no hesitation today to call the hessian hessian.
A: A mistake that isn't a mistake: in an early edition of Number Theory by Borevich and Shafarevich (corrected in later editions), there is a typographical error which doesn't change the meaning or correctness of the intended text, yet it is obvious that it is a typographical error. Namely, there is a table which is divided into four cases: $n\equiv 0\ (\mathrm{mod}\ 4)$, $n\equiv 1\ (\mathrm{mod}\ 4)$, $n\equiv 22\ (\mathrm{mod}\ 4)$, and $n\equiv 3\ (\mathrm{mod}\ 4)$. (I don't have a copy available, so I cannot give the precise reference.)
A: I believe Kummer's failed attempt at a proof of Fermat's last theorem led to the discovery of ideals.
A: Not just a great mistake, but also a great documentation of a mistake: Stallings's How not to prove the Poincare Conjecture.1 (I think this paper is my answer to every community-wiki question.)
1Here is a Wayback Machine link.
A: Pontryagin made a famous mistake while computing the stable homotopy groups of spheres (specifically, π2) which led to the discovery of the Kervaire invariant.  I won't spoil what the mistake was: watch this video of Mike Hopkins' talk (second video on the page), starting about 7 minutes in.
A: Supposedly Stefan Bergman attended a course on orthogonal functions while an undergraduate, and misunderstood what he was hearing, believing that the functions were supposed to be analytic. This led him to the Bergman kernel and Hilbert spaces of analytic functions, which has developed into a whole field of study at the junction of complex analysis and operator theory, and also with important ramifications in the more geometric parts of SCV. If the story is true, this was certainly an extremely fruitful mistake!
A: Karl Pearson's contributions in the development of statistics are so ubiquitous that most users take his assumptions for granted.  One key contribution and mistake of his was to claim that all distributions are parametric.  Such models are still predominantly used in social and behavioral sciences, but his insistence led to a lot of interesting and very useful developments in mathematical statistics and its applications by people who published refutations of his work (like R.A. Fisher).
As a non-math mistake, Karl Pearson avidly advocated eugenics towards racial purity.  Big mistake.
A: Cantor's been mentioned, but I think the lessons there should be different.  First, the really big mistake was that of highly-reputed academics (including, I believe, Poincare, Kronecker and even Wittgenstein) who rejected his ideas.  And (related) second, even in a wiki devoted to mistakes it seems somewhat carping to fault Cantor for failing to spot a subtlety without at the same time adequately crediting his genius.
Somewhat along the same lines, one might mention Fourier's difficulties in getting his ideas accepted.
A: Poincaré's discovery of homoclinic points grew out of a extremely serious mistake he made in his original submission for a prize essay contest sponsored by Acta Mathematica in 1888. His original 200 page manuscript, on the restricted three-body problem, was evaluated by Weierstrass, Mittag-Leffler, and Phragmén, who had great difficulty following his arguments. Poincaré responded with a dozen further explanations, totaling 100 pages. After many further exchanges, the editors finally decided to accept the manuscript (this was, after all, Poincaré, and he must know what he's doing) and awarded him the prize.
But around the time of publication, Phragmén was still puzzled by some points and Mittag-Leffler wrote to Poincaré. They received back a telegram from Poincaré asking that publication be stopped immediately! Poincaré realized that his belief that the stable and unstable manifolds could not intersect transversally was wrong, and that such intersection points, which he later called homoclinic points, immediately forced very complicated dynamically behavior, invalidating much of his work. He wrote to Mittag-Leffler:

"I have written this morning to Mr. Phragmén to tell him about an error which I have committed and he has undoubtedly informed you of my letter. But the consequences of this error are more serious than I first thought. It is not true that the asymptotic surfaces are closed, at least not in the sense that I meant before. What is true, is that if one considers the two parts of that surface (which I yesterday still believed coincided with each other) they intersect along infinitely many asymptotic trajectories and furthermore their distance is an infinitesimal of higher order than $\mu^p$ however big p is.
I don't conceal from you the trouble this discovery gives me."

Mittag-Leffler immediately halted the presses and recalled all copies of this issue he could get, destroying them all (except for a few, one of which remains in the library of the Mittag-Leffler Institute). They asked Poincare to pay for the suppression of this issue, which he did.
Poincare then wrote a new essay, incorporating many of the added notes from the original, and this was the version that Acta Mathematica published (with no mention of the earlier one). Eventually Poincaré used this as the basis of his three volume classic Les méthodes nouvelles de la mécanique céleste.
A riveting account of this story is contained in Poincaré's discovery of homoclinic points by K. G. Anderson, Archive History of Exact Sciences, 48(2) (1994), 133–147.
A: Steiner's count 7776 of the number of the number of plane conics tangent to 5 general plane conics certainly deserves a mention here. He gave this answer in 1848, and it wasn't fixed until 1864, when Chasles pointed out the error and came up with the correct value of 3264. You can regard this as the first recognition of needing appropriate compactifications in order to do valid calculations in enumerative geometry.
A: The Grunwald-Wang theorem: https://en.wikipedia.org/wiki/Grunwald%E2%80%93Wang_theorem on the injectivity of $K^\times/n \to \prod K_\mathfrak{p}^\times/n$ for a global field $K$. (Proof with mistake by Grunwald in 1933, corrected by Wang in 1948, who found a counterexample, but showed that it is correct if one is not in a "special case") See also https://www.mathi.uni-heidelberg.de/~schmidt/NSW2e/index-de.html (Cohomology of Number Fields) Chapter IX, especially Theorem 9.1.11.
A: Goodrick's "story from Grad school" is incorrect.   According to Ronald Jensen, the set theorist in question, he felt that the concept was important enough that it deserved a name which had not already been used elsewhere in mathematics.   And 'mice' was it.  (Also, note that 'mice' is a noun, and 'nice' is an adjective --- it would not make sense.) 
A: Hilbert's program, whose development was induced by on assumptions shattered by Gödel.  
A: C.N. Little listing the Perko pair as different knots in 1885 (10161 and 10162). The mistake was found almost a century later, in 1974, by Ken Perko, a NY lawyer (!)
For almost a century, when everyone thought they were different knots, people tried their best to find knot invariants to distinguish them, but of course they failed. But the effort was a major motivation to research covering linkage etc., and was surely tremendously fruitful for knot theory.
 (source)

Update (2013):
This morning I received a letter from Ken Perko himself, revealing the true history of the Perko pair, which is so much more interesting! Perko writes:

The duplicate knot in tables compiled by Tait-Little [3], Conway [1], and Rolfsen-Bailey-Roth [4], is not just a bookkeeping error. It is a counterexample to an 1899 "Theorem" of C.N. Little (Yale PhD, 1885), accepted as true by P.G. Tait [3], and incorporated by Dehn and Heegaard in their important survey article on "Analysis situs" in the German Encyclopedia of Mathematics [2].

Little's `Theorem' was that any two reduced diagrams of the same knot possess the same writhe (number of overcrossings minus number of undercrossings). The Perko pair have different writhes, and so Little's "Theorem", if true, would prove them to be distinct!
Perko continues:

Yet still, after 40 years, learned scholars do not speak of Little's false theorem, describing instead its decapitated remnants as a Tait Conjecture- and indeed, one subsequently proved correct by Kauffman, Murasugi, and Thistlethwaite.
I had no idea! Perko concludes (boldface is my own):

I think they are missing a valuable point. History instructs by reminding the reader not merely of past triumphs, but of terrible mistakes as well.

And the final nail in the coffin is that the image above isn't of the Perko pair!!! It's the `Weisstein pair' $10_{161}$ and mirror $10_{163}$, described by Perko as  "those magenta colored, almost matching non-twins that add beauty and confusion to the Perko Pair page of Wolfram Web’s Math World website. In a way, it’s an honor to have my name attached to such a well-crafted likeness of a couple of Bhuddist prayer wheels, but it certainly must be treated with the caution that its color suggests by anyone seriously interested in mathematics."
The real Perko pair is this:

You can read more about this fascinating story at Richard Elwes's blog.
Well, I'll be jiggered! The most interesting mathematics mistake that I know turns out to be more interesting than I had ever imagined!

1. J.H. Conway, An enumeration of knots and links, and some of their algebraic properties, Proc. Conf. Oxford, 1967, p. 329-358 (Pergamon Press, 1970).
2. M. Dehn and P. Heegaard, Enzyk. der Math. Wiss. III AB 3 (1907), p. 212: "Die algebraische Zahl der Ueberkreuzungen ist fuer die reduzierte Form jedes Knotens bestimmt."

3. C.N. Little, Non-alternating +/- knots, Trans. Roy. Soc. Edinburgh 39 (1900), page 774 and plate III. This paper describes itself at p. 771 as "Communicated by Prof. Tait."

4. D. Rolfsen, Knots and links (Publish or Perish, 1976). 
A: Perhaps not under this heading but I enjoy reading in Marshall Hall Group Theory book:
"Let p be any old prime."
A: Bringing in sort of tragic flavor to this question, - the following came to my mind:

He was not a very careful person as a mathematician. He made a lot of mistakes. But he made mistakes in a good direction. I tried to imitate him. But I've realized that it's very difficult to make good mistakes.

(Shimura on Taniyama, seen it in the "BBC Horizon Season 1996 Episode 2 - Fermat's Last Theorem" available on Youtube)
A: In chapter 3 of What Is Mathematics, Really? (pages 43-45), Prof. Hersh writes:

How is it possible that mistakes occur in mathematics? 
René Descartes's Method was so clear, he said, a mistake could only happen by inadvertence. Yet, ... his Géométrie contains conceptual mistakes about three-dimensional space. 
Henri Poincaré said it was strange that mistakes happen in mathematics, since mathematics is just sound reasoning, such as anyone in his right mind follows. His explanation was memory lapse—there are only so many things we can keep in mind at once. 
Wittgenstein said that mathematics could be characterized as the subject where it's possible to make mistakes. (Actually, it's not just possible, it's inevitable.) The very notion of a mistake presupposes that there is right and wrong independent of what we think, which is what makes mathematics mathematics. We mathematicians make mistakes, even important ones, even in famous papers that have been around for years. 
Philip J. Davis displays an imposing collection of errors, with some famous names. His article shows that mistakes aren't uncommon. It shows that mathematical knowledge is fallible, like other knowledge. 
... 
Some mistakes come from keeping old assumptions in a new context. 
Infinite dimensional space is just like finite dimensional space—except for one or two properties, which are entirely different. 
...
Riemann stated and used what he called "Dirichlet's principle" incorrectly [when trying to prove his mapping theorem]. 
Julius König and David Hilbert each thought he had proven the continuum hypothesis. (Decades later, it was proved undecidable by Kurt Gödel and Paul Cohen.) 
Sometimes mathematicians try to give a complete classification of an object of interest. It's a mistake to claim a complete classification while leaving out several cases. That's what happened, first to Descartes, then to Newton, in their attempts to classify cubic curves (Boyer). [cf. this annotation by Peter Shor.] 
Is a gap in a proof a mistake? Newton found the speed of a falling stone by dividing 0/0. Berkeley called him to account for bad algebra, but admitted Newton had the right answer... Mistake or not? 
... 
"The mistakes of a great mathematician are worth more than the correctness of a mediocrity." I've heard those words more than once. Explicating this thought would tell something about the nature of mathematics. For most academic philosopher of mathematics, this remark has nothing to do with mathematics or the philosophy of mathematics. Mathematics for them is indubitable—rigorous deductions from premises. If you made a mistake, your deduction wasn't rigorous, By definition, then, it wasn't mathematics! 
So the brilliant, fruitful mistakes of Newton, Euler, and Riemann, weren't mathematics, and needn't be considered by the philosopher of mathematics. 
Riemann's incorrect statement of Dirichlet's principle was corrected, implemented, and flowered into the calculus of variations. On the other hand, thousands of correct theorems are published every week. Most lead nowhere. 
A famous oversight of Euclid and his students (don't call it a mistake) was neglecting the relation of "between-ness" of points on a line. This relation was used implicitly by Euclid in 300 B.C. It was recognized explicitly by Moritz Pasch over 2,000 years later, in 1882. For two millennia, mathematicians and philosophers accepted reasoning that they later rejected. 
Can we be sure that we, unlike our predecessors, are not overlooking big gaps? We can't. Our mathematics can't be certain.

The reference to the said article by Philip J. Davis is:
Fidelity in mathematical discourse: Is one and one really two? Amer. Math. Monthly 79 (1972), 252–263.
From that article, I find particularly amusing the following couple of paragraphs from page 262:

There is a book entitled Erreurs de Mathématiciens, published by Maurice Lecat in 1935 in Brussels. This book contains more than 130 pages of errors committed by mathematicians of the first and second rank from antiquity to about 1900.There are parallel columns listing the mathematician, the place where his error occurs, the man who discovers the error, and the place where the error is discussed. For example, J. J. Sylvester committed an error in "On the Relation between the Minor Determinant of Linearly Equivalent Quadratic Factors", Philos. Mag., (1851) pp. 295-305. This error was corrected by H. E. Baker in the Collected Papers of Sylvester, Vol. I, pp. 647-650. 
... 
A mathematical error of international significance may occur every twenty years or so. By this I mean the conjunction a mathematician of great reputation and a problem of great notoriety. Such a conjunction occurred around 1945 when H. Rademacher thought he had solved the Riemann Hypothesis. There was a report in Time magazine.

A: Foias constant also comes from a mistake. I quote directly from An interesting serendipitous real number by John Ewing and Ciprian Foias:

This is the story of a remarkable real number, the discovery of which was
due to a misprint. Namely, in the midseventies, while Ciprian was at the
University of Bucharest, one of his former students approached him with
the following question:


(Q) If $x_1>0$ and $x_{n+1}=\left(1+\frac1{x_n}\right)^n$ $(n= 1,2, ... )$, can $x_n\rightarrow\infty$?


This was listed in a fall issue of the "Gazeta Matematica" as one of
the problems given at the previous summer admission examination for
prospective freshmen in the Department of Mathematics at the University
of Bucharest. Ciprian found the answer in about one day, but considered
that the problem was even above the sophomore level. He also found that
(Q) is a misprinted version of the following question (given by Professor N.
Boboc):


(Q') If $x_1>0$ and $x_{n+1}=\left(1+\frac1{x_n}\right)^{x_n}$ $(n= 1,2, ... )$, can $x_n\rightarrow\infty$?


This was an appropriate exam question since the answer is clearly "No."
Years later, in the 1980s, Ciprian told the story to Professor P. Halmos,
who in turn told the story to John, but mischieveously did not mention
at all Ciprian's answer to (Q), so a day later John also found the answer.
This answer is given by the following


Theorem 1.1 There exists exactly one real number $a\sim 1.187$ such that
if $x_1=a$ then $x_n\rightarrow\infty$. Moreover in this case
$$x_n\frac{\ln n}n\rightarrow 1 \text{ for } n\rightarrow\infty \ \ (1)$$
Relation (1) can be rewritten as
$$\lim_{n\rightarrow\infty} \frac{x_n}{\pi(n)}=1  \ \ (2)$$
where $\pi(n)$ is the number of primes less than $n$. However after many attempts to establish a deeper connection with the Prime Number Theorem, we came to believe that relation (2) is fortuitous. A strong argument for this opinion is provided by Theorem 3.1 below in which we show that the estimate for the error
$$x_n\frac{\ln n}n-1$$
differs from its analog in the Prime Number Theorem.

An interesting serendipitous real number. J. Ewing, C. Foias.
Finite versus infinite. Contributions to an eternal dilemma. Springer (2000), pages 119-126.
A: William Shanks (1812-1882), who calculated pi to the 707th place, by hand, but it was only correct for the first 527 places.
A: The recent paper by Richard Brent “Some instructive mathematical errors” certainly deserves a mention in this thread:

We describe various errors in the mathematical literature, and consider how some of them might have been avoided, or at least detected at an earlier stage, using tools such as Maple or Sage. Our examples are drawn from three broad categories of errors. First, we consider some significant errors made by highly-regarded mathematicians. In some cases these errors were not detected until many years after their publication. Second, we consider in some detail an error that was recently detected by the author. This error in a refereed journal led to further errors by at least one author who relied on the (incorrect) result. Finally, we mention some instructive errors that have been detected in the author's own published papers.

A: A posthumous book on number theory by Dirichlet appeared in 1859. It stated that Euclid's proof of the infinitude of primes was by contradiction, starting with an assumption that only finitely many primes exist and then deducing a contradiction.
Euclid's actual proof, recast in modern language, was that if $S$ is any finite set of primes (with no assumption that it constains the smallest $n$ primes nor that it contains all primes), then the prime factors of $1+\prod S$ are not members of $S;$ hence there are always more primes than what one already has.
For example, if $S=\{5,7\}$ then $1+\prod S=36=2\times2\times3\times3$ and the new primes are $2$ and $3.$
This requires no assumption that $S$ contains all primes.
Only the assumption that $S$ contains all primes could justify the conclusion that $1+\prod S$ has no prime factors, and so "is therefore itself prime", to quote G. H. Hardy (no relation to me, as far as I know) on pages 122–123 of the 1908 edition of A Course of Pure Mathematics (but not in the posthumous 10th edition).
The erroroneous belief that $1+\prod S$ is prime whenever $S$ is the set of the smallest $n$ primes for some $n$ has been held by some conscientious persons. The smallest (but not the only) counterexample is $1+(2\times3\times5\times7\times11\times13) = 59\times509.$
Catherine Woodgold and I examined in some detail the error of thinking that this proof is by contradiction in "Prime Simplicity", Mathematical Intelligencer, volume 31, number 4, Fall 2009, pages 44–52.
A: I don't know if this is really a mistake: Fermat's "missing proof" for Fermat's last theorem.
A: Samuel I. Krieger made many attempts at significant contributions to the field of mathematics, unfortunately some of his efforts did not pan out.
In 1934, he claimed that the 72-digit composite number $231,584,178,474,632,390,847,141,970,017,375,815,706,593,969,331,281,128,078,915,826,259,279,871$ was the largest known prime number.
He also attempted to show that the number $2^{256}(2^{257}-1)$ was perfect, implying that $2^{257}-1$ is a prime number.  $2^{257}-1$ is actually a composite number: its smallest prime factor is $535,006,138,814,359.$
Finally, he claimed to have a counter example to Fermat's Last Theorem $x^n + y^n = z^n$ using the numbers $x = 1324, y = 731$ and $z = 1961$ with an undisclosed $n.$  A reporter supposedly called Krieger to ask how the left and the right hand side could be equal, when the left hand side could only end in a $4$ or a $6$ plus $1,$ and the right hand side could only end in $1.$
A: I find this one (it is not in the same vein as the ones that have been posted here so far, this is not a pure math mistake) to be interesting and instructive to students:
patriot missile failure due to poor understanding of binary decimals
A: Petrovskiĭ-Landis solution to the second part of Hilbert 16th problem.
They "proved" the existence of a bound for the number of limit cycles
of planar polynomial vector fields of fixed degree. Ilyashenko pointed
out the mistake. 
The problem remains wide open but the basic idea of Petrovskiĭ-Landis ( complexification of real differential equations )
lead to the study of holomorphic foliations. 
A: An error of Lebesgue.  1905 or so.  Take a Borel set in the plane, project it onto a line, the result is a Borel set.  Obvious: the projection of an open set is open, and the Borel sets in the plane are the least family containing the open sets, closed under countable unions and countable decreasing intersections.
But wrong.  Projection doesn't commute with countable decreasing intersection.
Studying this error led Suslin to begin the line of study now called "descriptive set theory", 1917 or so.
A: Lakatos' work "Proof and refutation" contains many examples of mistakes concerning the development of Euler's polyhedron formula, along with an extensive treatment of what mistakes are and how they can crucially contribute to the development of mathematics.
A: All of the (in retrospect) misguided attempts to prove Euclid's Parallel Postulate, which eventually led Gauss to develop hyperbolic geometry.
A: The mother of all examples: Euclid's Elements contains errors from start to finish.
A: The question above says:

Some mistakes in mathematics made by extremely smart and famous people can eventually lead to interesting developments and theorems,

This will be a very minor example, included because the person who made the mistake is very smart and very famous, but not because it led to anything.
Take three regular pentagons sharing a vertex and three edges, as in a dodecahedron. Set it down on a horizontal mirror, so that the three edges opposite the common vertex make contact with their reflections.
These three pentagons and their mirror-images are (but are they??) six faces of a polyhedron that also has three faces that are rhombuses or rhombi or rhomboi or whatever they're called.
So Donald Knuth once thought, according to what he said in a seminar that I attended.
But the four edges of the putative rhomboi are not coplanar, so instead of those three faces you have six triangular faces.
A: Cantor's set theory - had he known the related paradoxes, he would probably not have started developing set theory.   
A: I think The Feynman path integral may be regarded as a great mathematical mistake, as once remarked by Richard Borcherds in a conversation.
