Serendipitous mathematical discoveries in recent times
As of today, most important results in mathematics are conjectured long before they are proven.
Are there any examples of (important) mathematical discoveries that were proven by chance rather than from the authors conducting a targeted research on a hypothesis? I'm interested especially in results obtained in the last 100 years or so.
Solution 1:
A fun instance in proof-theory. The Curry-Howard correspondence links computational calculi to logical systems. In particular, there are (old) isomorphisms between a Hilbert-style deduction system and combinators, and between natural deduction and lambda-calculus, both in the case of intuitionist logic. It was widely believed that there wasn't anything similar for classical logic, or rather logicians all knew it was an impossible task, because classical logic didn't have any computational meaning. (Note: classical logic is intuitionist logic with the law of excluded middle, $A\vee \neg A$, added as an inference rule.)
But in 1989, a computer scientist, who didn't know it was impossible, did it: he gave a type system for Scheme, with the $\texttt{call/cc}$ primitive, which was typed by Peirce's law, a rule equivalent to the law of excluded middle. From that the Curry-Howard isomorphism was generalized to classical logic and then many more complex calculi, which greatly influenced the field of proof theory, influencing proof assistants and programming language design.
Solution 2:
In 1979-80 when Benoit Mandelbrot was a Visiting Professor of Mathematics at Harvard University he had the chance to use the brand new Vax computer. On the $1$st March $1980$ he had a first detailed picture of an island molecule in the Mandelbrot set for \begin{align*} z\rightarrow z^2-c \end{align*}
B. Mandelbrot wrote in his contribution Fractals and the Rebirth of Iteration Theory in The Beauty of Fractals by Heinz-Otto Peitgen and Peter Richter:
... The beauty of many fractals is the more extraordinary for its having been wholly unexpected ...