and that was a trifling length of time , considering that fermat had driven mathematicians crazy for almost four hundred years before an englishman named andrew wiles succeeded in unravelling the puzzle , as recently as 1993 .