As I said, I don't know how he did it, but think. It had to be an illusion (even if only based on human psychology). Because otherwise this character really could predict the future or read minds, and if he could do either one, do you really think he would be walking down the street doing magic tricks? Either of those powers, if real, would make it very easy to rule either the world or any subset of it that struck your fancy. Sheesh.
You want a wild guess? Here goes. The odds of getting that right by pure random chance are 50 X 49 X 48 (assuming three different numbers, 1 to 50). That's one in 117,600. Pretty long odds. If we assume that most people will pick 7 for one of those numbers, it reduces the odds to 49 X 48, or one in 2,352. Not impossible. People beat those odds all the time. If this guy made a study of what numbers people will guess most often in such a situation, he could reduce the odds further still. He could have just walked around giving the same pitch to everyone he met, using the same three numbers, and Danny happened to be one of this guy's lucky ones. That's one (admitedly not likely) scenario. I'm not an expert on mentalism effects -- quite the contrary.
Robert V Frazier