James Murphy, the former frontman of the band LCD Soundsystem, made what he called the biggest mistake of his life at 21, when he turned down a writing job on a sitcom that was about to launch.

The sitcom’s name was Seinfeld.

Instead, he lurched around, working as a bouncer and later a DJ before finally releasing the first LCD Soundsystem album at the not-so-tender age of 35.

Murphy might have been older than some of his dance-rock peers, but his experience is fairly common among people who experience major creative breakthroughs, according to a new paper from NBER.

The authors examined the high points of the careers of both great inventors and Nobel-Prize winning scientists, and they found that the late 30s were the sweet spot for strokes of genius:

Innovators have been peaking slightly later in life as the 20th century has progressed, in part because today’s scientists have more to learn than their predecessors did:

What’s more, people who excel in abstract fields, like art or physics, tend to be younger than those who win prizes in fields that require more context, like history or medicine. Another 1977 study found that physics Nobel winners were 36 on average when they did their prize-winning work, while chemists were 39 and medical doctors were 41.

So why the late 30s? The most obvious factor is education: Scientists spend ages 5 through 18 in school, and then ages 18 through 30ish getting their academic degrees. Then a few years of learning on the job, and presto! You dig up an uncertainty principle. Meanwhile, scientific breakthroughs tend to be less common in old age because we invest less in learning as we get older, and our skills gradually become less relevant.

There’s evidence from the humanities, though, that genius doesn’t decline with age at all. Over 40% of both Robert Frost’s and William Carlos Williams’ best poems were written after the poets turned 50. Paul Cézanne’s highest-priced paintings were made the year he died.

The NBER paper found that scientists who are theoretical (coming up with new ways of thinking) tend to peak earlier than those who are experimental (coming up with answers based on existing knowledge) by about 4.6 years.

This happens for two reasons: First, theoretical scientists don’t necessarily have to wait for a bunch of experiments to get completed and published. Second, and perhaps more importantly, being relatively new to their fields allows them to see the holes and fissures that veterans might not.

Here’s how the study’s authors explain it:

The most important conceptual work typically involve radical departures from existing paradigms, and the ability to identify and appreciate these radical departures may be greatest shortly after initial exposure to a paradigm, before it has been fully assimilated.

They quote Sigmund Freud in Civilization and its Discontents as writing, “The conceptions I have summarized here I first put forward only tentatively, but in the course of time they have won such a hold over me that I can no longer think in any other way.”

Genius, it seems, happens when a seasoned mind sees a problem with fresh eyes.

Read This Next: Get a PhD—but leave academia as soon as you graduate

This post originally appeared at the Atlantic. More from our sister site:

How to save marriage in America

The science behind “brain training”

The evolution of the area code