I then began to study arithmetical questions without any great apparent result, and without suspecting that they could have the least connexion with my previous researches. Disgusted at my want of success, I went away to spend a few days at the seaside, and thought of entirely different things. One day, as I was walking on the cliff, the idea came to me, again with the same characteristics of conciseness, suddenness, and immediate certainty, that arithmetical transformations of indefinite ternary quadratic forms are identical with those of non-Euclidian geometry.
Henri Poincare (2012). “The Value of Science: Essential Writings of Henri Poincare”, p.649, Modern Library