I've heard similar stories told about mathematicians writing a theorem on taxicabs during a cross town trip, and leaving the cab. Little doubt this kind of thing is a staple of the "absent minded professor" trope.
The anecdote I was thinking of is from Alfred Bester's "The Men Who Murdered Mohammed" in 1958
They were also real mad professors. Ampère, for example, was on his
way to an important meeting of scientists in Paris. In his taxi he got
a brilliant idea (of an electrical nature, I assume) and whipped out a
pencil and jotted the equation on the wall of the hansom cab. Roughly,
it was: dH = ipdl/r 2 in which p is the perpendicular distance from Ñ to the line of the element dl; or dH
= i sin è dl/r 2 . This is sometimes known as Laplace’s Law, although he wasn’t at the meeting.
Anyway, the cab arrived at the Académie.
Ampère jumped out, paid the driver and rushed into the meeting to tell
everybody about his idea. Then he realized he didn’t have the note on
him, remembered where he’d left it, and had to chase through the
streets of Paris after the taxi to recover his runaway equation.
Sometimes I imagine that’s how Fermat lost his famous “Last Theorem,”
although Fermat wasn’t at the meeting either, having died some two
hundred years earlier.