SAN FRANCISCO -- The mathematician who thought last year that he had solved one of math's most vexing problems has submitted an updated proof that supposedly solves the equation proposed by a 17th-century French mathematician.

In June 1993, Princeton professor Andrew Wiles received intense publicity after he claimed to have proven an assertion by Pierre de Fermat, whose challenge has tormented math lovers for more than three centuries.

But after an initial burst of euphoria, experts examining Mr. Wiles' 200-page proof found a gap in his logic, and by December the Princeton mathematician admitted on a computer bulletin board that his supposed proof had a flaw.

On Tuesday morning, however, Mr. Wiles left a cryptic electronic mail message for a University of California-Berkeley mathematician, Ken Ribet.

"He told me to expect a surprise," said Mr. Ribet, who soon received an express mail package containing Mr. Wiles' new 200-plus-page proof of Fermat's last theorem.

Mr. Wiles could not be reached for comment Tuesday. A Princeton spokeswoman, Jacquelyn Savani, confirmed that Mr. Wiles just submitted the revised proof to the Annals of Mathematics, a Princeton-based scientific journal that formally reviews the validity of such technical proofs.

Fermat's last theorem challenged mathematicians to prove that it is impossible to find any positive, whole number "n" -- other than the number 2 -- such that X to the nth power plus y to the nth power equals Z to the nth power.

In a margin note that has tormented mathematicians ever since, Fermat said he had found "an admirable proof of this theorem, but the margin is too narrow to contain it."