Count to a Trillion by John C. Wright
After the collapse of the world economy, a young boy grows up in what used to be Texas as a tough duellist for hire, the future equivalent of a hired gun. But even after the collapse, there is space travel, and he leaves Earth to have adventures in the really wide open spaces. While humanity, and Artificial Intelligence grow and change, he is catapulted into the more distant future and becomes a kind of superman.