As a student at Harvard, Bill Gates impressed professors with his mathematical brilliance. Getty Images / Emmanuel Dunand As a student at Harvard in the 1970s, Bill Gates impressed more than one faculty member with his mathematical brilliance.

He proposed an elegant solution to what's known as "pancake sorting," and his insights were published in the journal Discrete Mathematics in 1979, in a paper co-bylined with then-Harvard professor Christos Papadimitriou.

A few years ago, Papadimitriou, now a professor of computer science at the University of California at Berkeley, shared an anecdote about working with Gates in a publication of the Association for Computing Machinery. The anecdote resurfaced in a recent answer on the Quora thread, "How intelligent is Bill Gates?"

The story serves as a reminder that the wealthiest and most successful people among us may have been exceptional from the start.

Here's Papadimitriou:

When I was an assistant professor at Harvard, Bill was a junior. My girlfriend back then said that I had told her: "There's this undergrad at school who is the smartest person I've ever met."

That semester, Gates was fascinated with a math problem called pancake sorting: How can you sort a list of numbers, say 3-4-2-1-5, by flipping prefixes of the list? You can flip the first two numbers to get 4-3-2-1-5, and the first four to finish it off: 1-2-3-4-5. Just two flips. But for a list of n numbers, nobody knew how to do it with fewer than 2n flips. Bill came to me with an idea for doing it with only 1.67n flips. We proved his algorithm correct, and we proved a lower bound—it cannot be done faster than 1.06n flips. We held the record in pancake sorting for decades. It was a silly problem back then, but it became important, because human chromosomes mutate this way.

Two years later, I called to tell him our paper had been accepted to a fine math journal. He sounded eminently disinterested. He had moved to Albuquerque, New Mexico to run a small company writing code for microprocessors, of all things. I remember thinking: "Such a brilliant kid. What a waste."

Thirty years later, other researchers found a sorting strategy that's 1% faster. But according to an NPR interview with Harry Lewis, another Harvard professor who taught Gates in the 1970s, those researchers had the help of powerful computers. The young Gates, on the other hand, relied solely on his own cognitive resources (and in fact he helped develop the computers that would find a faster solution).

It's easy to dismiss these reminiscences as exceptions to the rule — the rule that anyone can make it big without being a genius at age 20.

But a growing body of research suggests that intelligence is a remarkably good predictor of wealth and success later in life.

Your test performance at a young age may predict your wealth and success later in life. Shutterstock In 2013, Jonathan Wai, a professor at Duke University's Talent Identification Program, published a study that found the majority of Fortune 500 CEOs and billionaires had attended an elite academic institution either as an undergraduate or graduate student, putting them in the top 1% of cognitive ability. Even among the top 0.0000001% of wealth, Wai reported, those who earned more were generally better educated.

More recent research by Wai has found that about 40% of a sample of 1,991 CEOs attended elite schools, which presumably means they were in the top 1% of cognitive ability. Moreover, Wai found that companies run by more highly educated CEOs tended to perform better. Wai equates admission to an elite institution with smarts because those schools admit only students with top SAT scores and SAT scores are generally related to intelligence.

Wai's methodology and conclusions have been criticized, for example by Steve Siebold, author of "How Rich People Think," and Wai admits that he would have preferred to gain access to people's SAT scores if that were possible. In an article on Business Insider, Wai acknowledged, "It might be that the power of the networks, brand name, and quality of education that come with elite-school attendance is why so many of these people ended up in such positions of influence."

Another small study, conducted by researchers at Vanderbilt University, found that 320 students who had scored above the 1-in-10,000 level on the SAT before age 13 held more prestigious jobs at more prestigious companies by age 38 than the rest of the population on average.

Bill Gates himself has acknowledged the potential link between intelligence and professional success. In 2005, he told Forbes: "Microsoft must win the IQ war, or we won't have a future."

The idea that intelligence might play more than a minimal role in individual success is an uncomfortable one to consider. But the takeaway from these studies and anecdotes isn't that, if you aren't off-the-charts intelligent (at least by standard measures of intelligence), you can't or won't get anywhere. It just seems to be statistically less likely you'll become the next Bill Gates.