Foundation, by Isaac Asimov (pub. 1951)
Amazon; Asimov Wiki; B&N; Goodreads; isfdb; Penguin Random House; Wikipedia

In the first story (The Psychohistorians), we meet a man named Gaal Dornick, who is coming from his provincial home planet of Synnax for the first time to Trantor, the capital world of the Galactic Empire, which included nearly 25 million inhabited planets. Dornick was joining a team of scientists led by Hari Seldon, who has developed a mathematical science called psychohistory (I don't think he invented it, just sort of perfected it), which, given a large enough group (the population of a galaxy), can predict the course of future history. Seldon has foreseen that within three centuries, the Empire will have crumbled, and following that, there would come 30,000 years of barbarism, before a second Galactic Empire would finally be established. But Seldon had a Plan, which would result in shortening the interregnum to a single thousand years. (Actually, I get the impression that the thousand years of Seldon's Plan includes the three centuries it will take before the Empire finally falls apart completely, which technically means there will be 700 years of barbarism... but I'm not entirely clear on this point.)

Anyway, to that end, he set up an Encyclopedia Foundation on an uninhabited planet of few natural resources, called Terminus, on the outer rim of the galaxy. (He is also recorded to have mentioned the establishment of a Second Foundation, at "Star's End," at the opposite end of the galaxy. However, no details were given about that Foundation, which remained a great mystery.) The second story (The Encyclopedists) is set fifty years after the first Foundation's establishment (50 F.E.), at which point there comes a situation that is known as a "Seldon Crisis." That is, events which threaten the very existence of the Foundation, wherein the solution to this Crisis can lead its people down only one path. Of course, there had been no psychohistorians on Terminus, because the Encyclopedists were not meant to be aware of any of this. They couldn't be, or that knowledge and the extra free will it would bring, could mess up the Plan. However, a holographic recording of Seldon revealed the truth to a group of Encyclopedists- and the mayor of Terminus City, Salvor Hardin- without actually revealing the solution to their current Crisis.

But Hardin had a solution. Honestly, as much as the Plan that had been set in motion secretly by Seldon's group, controlled the possible actions of the Foundation for centuries to come, I think it rather depended on there being individuals with a fair degree of insight and inspiration to be in the right place at the right time whenever a Crisis arose. Such men, who often were opposed by various people within and/or outside of the Foundation at the time, would later be almost as revered as Seldon himself. And of course, each solution to each Crisis would have a profound impact on the development of future history... which would eventually, inevitably lead to the next Seldon Crisis. It might almost be seen as ironic that the solution to one problem inexorably leads to another, even if it takes several decades, but... it's not really irony. All part of the Plan....

The third story (The Mayors) tells of the second Seldon Crisis, which comes 30 years after the first (80 F.E), and is once again solved by Salvor Hardin, at which point Seldon's hologram once again appears. While the first story introduced us to Dornick and Seldon and the whole point of the series, the second and third stories were largely about Hardin, and the first two Crises. The fourth story (The Traders, set about 55 years later) doesn't involve a Crisis, but it does relate to the one which finally approaches in the fifth story (The Merchant Princes, another 20 years later, 155 F.E.; Wikipedia and some other sites may say "The Traders" is set 75 years after the last Crisis, but as far as I can tell, it is this fifth story which is set 75 years after the second Crisis). The third Seldon Crisis is solved by a trader named Hober Mallow, who would become the first of the Merchant Princes. And it's here that the first book ends. I'd really rather not reveal the natures of the various Crises or their solutions, not wanting to spoil the story. I think you can understand what the books are about without knowing too many details....

science fiction index
(Image is a scan of my own copy.)