Examples of Mathematical Papers that Contain a Kind of Research Report What are examples of well received mathematical papers in which the author provides detail on how a surprising solution to a problem has been found.  
I am especially looking for papers that also document the dead ends of investigation, i.e. ideas that seemed promising but lead nowhere, and where the motivation and inspiration that lead to the right ideas came from.  
By "surprising solution" I mean solutions that feel right at first reading and it isn't clear why they haven't been found earlier.  
 A: A nice example is the article "The method of undetermined generalization and specialization, illustrated with Fred Galvin's amazing proof of the Dinitz Conjecture" by Doron Zeilberger in Amer. Math. Monthly 103, no. 3, 233-239, 1996 (see also here for a freely accessible version).
A: Another type of example.  Textbooks on non-Euclidean geometry may often begin with a chapter on historical failed attempts to prove the Parallel Postulate.
A: I enjoy The genesis of the Macdonald polynomial statistics, complete with journal entries, and detailed descriptions of the experimental method.
This paper describes how the researchers came up with a nice formula for the combinatorial (aka modified) Macdonald polynomials.
A: Richard P. Stanley's How the Upper Bound Conjecture was proved ends with two morals:

  
*
  
*The shortest path may not be the best.
  
*Even if you don’t arrive at your destination, the journey can still be
  worthwhile.
  

A: The paper

Rawnsley, John; Schmid, Wilfried; Wolf, Joseph A., Singular unitary representations and indefinite harmonic theory, J. Funct. Anal. 51, 1-114 (1983). ZBL0511.22005.

contains an unusual “Historical Note” (pp. 102–107). E.g.:

For various reasons one expects to get $\mu_n$ by... That does not work directly because... In 1975, S & W tried... At that point it became clear that an intrinsic higher $L_2$ cohomology theory was needed... In 1977, R & W looked... They did not see how to... This was the point at which S & W  had been stopped... During the following academic year B succeeded in... but the method did not extend past... R & W made some progress in... These results were not published formally because... During the summer of 1979, S & W discussed the apparent disparity and clarified... then carried out a computation... then looked at the case... Thus the original S & W problem was settled... At the end of the summer of 1980, S & W saw that... could be simplified... The present version was completed in... There are two important parallel developments which we understood only after... (etc.)

A: The prime example is Euler's papers. This style is out of fashion in 20th century.
Polya in Mathematics and Plausible reasoning discusses this question at length and
even reproduces completely (in English) one of Euler's papers (on partitions).
Of the 20th century examples I can mention 
MR1555091 Malmquist, J. Sur les fonctions a un nombre fini de branches définies par les équations différentielles du premier ordre. Acta Math. 36 (1913), no. 1, 297–343.
A: The first example that came to mind was 

MR0270881 (42 #5764) van der Waerden, B. L. How the proof of Baudet's conjecture was found. 1971 Studies in Pure Mathematics (Presented to Richard Rado) pp. 251–260 Academic Press, London.

There, van der Waerden describes some of the history as well as his proof of his well-known theorem.
Another example:

MR2245898 (2007j:05091) Seymour, Paul. How the proof of the strong perfect graph conjecture was found. Gaz. Math. No. 109 (2006), 69–83. 

From Wilson's review in Mathematical Reviews: "In this interesting and revealing paper, Seymour describes in graphic terms their assaults on the problem, the difficulties they came across, and the means they used to overcome these difficulties."
A: Ryan Williams provides a Casual Tour Around a Circuit Complexity Bound (the bound in question being that NEXP lacks nonuniform polysized ACC circuits) which may fit the bill, although I believe that Williams's goal is to give a motivated exposition rather than a 100% historically accurate account of how he came up with his proof.
