The series is a classic. It won the Hugo Award for best series ever. (The only winner ever by definition) The plot really was revolutionary. There was nothing like this before its release. Speaking of plot, from Wikipedia:
The premise of the series is that mathematician Hari Seldon spent his life developing a branch of mathematics known as psychohistory, a concept of mathematical sociology (analogous to mathematical physics). Using the laws of mass action, it can predict the future, but only on a large scale; it is error-prone on a small scale. It works on the principle that the behavior of a mass of people is predictable if the quantity of this mass is very large (equal to the population of the galaxy, which has a population of quadrillions of humans, inhabiting millions of star systems). The larger the number, the more predictable is the future.So basically any large system's future can be predicted with accuracy and the larger the system the greater the accuracy. This is not just simple statistics that psycho history encompasses. It involves specific sequences of events, and their timing.
This is of course impossible. It is science fiction, by the way. This was the subject of Hayek's The Counter Revolution of Science. Hayek makes the case that the social sciences are not concrete like the hard sciences, and the methods used in the hard sciences cannot be transferred to the softer science. In physics there are constants so a person can use the constants of physics to solve for the variables that are needed. Economics, on the other hand, deals with human action which has no constants. Only an omniscient being could know the state of all the factors in a large system of human actors. Not being omniscient, we mortals must use a different method to understand such a system.
In the fictional world of Foundation, Hari Seldon creates his Foundations (two of them actually) and saves the galaxy. A nearly omniscient being controls the galaxy to save it from its own destructive tendencies because as all liberals know most humans are not intelligent enough to know what is best for themselves. Hari Seldon's psychohistory predicted that the empire would fall, and the galaxy would have a dark age. The best Hari could do was to shorten the dark age to 1,000 years.
Rethinking the novel just now, most empires here on present day Earth have been fairly nasty. Maybe the galaxy would be better off without it. I don't know. I'm not omniscient, but Hari Seldon was near enough omniscient to make no difference. Maybe that is what really inspires Krugman.