Bill Gates has a published mathematics paper. As a Harvard undergraduate he co-wrote “Bounds for Sorting by Prefix Reversal” (1979) on the “pancake sorting” problem with professor Christos Papadimitriou — and the bound he proved stood as the best known for roughly 30 years.
As teenagers around 1970, Bill Gates and Paul Allen went dumpster-diving behind a Seattle computer company — Allen boosting the smaller Gates up to the bin — and pulled out a printout of the DEC operating system’s source code to learn how it worked.
Gates and three Lakeside classmates were banned for a summer from a local computer company after they were caught exploiting bugs to grab free machine time. The punishment became a deal: free computer time in exchange for hunting down the system’s bugs.