This is first class science fiction. Isaac Asimov’s Foundation series. The foundation story was written over a period of 50 years and not in chronological order. I would love to pay for these books to have them on my Ipad but they’re not available on Itunes. But I found them at this Google site. Here is the preferred order to read the books, including the Robot and Empire series:
The above site had a great illustration made by Michael Whelan.
Isaac Asimov on the future: