Both shows from episode 1 are about an incredibly intelligent yet crazy person and his Companion "running". Long before Moffat did either show, Doctor Who borrowed heavily from Arthur Conan Doyle. The Master was also based on Moriarity, being the Doctor's equal and opposite. I think at least...