Moriarty may have been inspired in part by two real-world mathematicians. If the characterisations of Moriarty's academic papers are reversed, they describe real mathematical events. Carl Friedrich Gauss wrote a famous paper on the dynamics of an asteroid in his early 20s, and was appointed to a chair partly on the strength of this result. Srinivasa Ramanujan wrote about generalisations of the binomial theorem, and earned a reputation as a genius by writing articles that confounded the best extant mathematicians. Gauss's story was well known in Doyle's time, and Ramanujan's story unfolded at Cambridge from early 1913 to mid 1914; "The Valley of Fear", which contains the comment about maths so abstruse that no one could criticise it, was published in September 1914. Irish mathematician Des MacHale has suggested George Boole may have been a model for Moriarty.