The Cosmic Computer - a novel by H. Beam Piper. Originally titled Junkyard Planet for it’s 1963 hardcover debut - it has had this title for all later editions. Based on a 1958 novelet in Galaxy: “Graveyard of Dreams.” This takes place in his loose “future history” - after the stories in Federation.
I’ve read this and liked this, but for a good plot summary, I quote from a review from Analog:
"Poictesme is a world that has gone to seed… colonized at the height of Man’s expansion into the Galaxy, and was a military base in a civil war that developed between the Terran Federation and some of the colony worlds. War over, it became a cosmic surplus depot, living off what it could scavenge and dreaming of finding Merlin. Merlin, the legend said, was the computer to surpass all computers, buried somewhere on Poictesme. Whoever found it would automatically get all the prizes of fairy-lore: the princess, the half-kingdom, the pot of gold, the 3 wishes - everything. So Conn Maxwell’s neighbors passed the hat and sent him to Earth to become a computer expert, and to find out where Merlin was hidden. As the story starts he comes home to his seedy homeworld, convinced that there is no Merlin. The book tells how he and his father, a hard-headed businessman, use Poictesme’s nonexistant 'Grail' as the carrot to get the planet’s mulish economy moving again. Not what you’d expect of teen-age space-opera? Well, no - but nobody in his right mind underrates the ability of a teen-ager to get just the point that the author is making, and nobody in his right mind should underestimate the ability of H. Beam Piper to get that point across." [P. Schuyler Miller]