* Persistence may have paid off for a Princeton University professor who has completed what he says is a new, improved solution to a problem that has vexed mathematicians since the 17th century.

Mathematician Andrew Wiles stated in a June 1993 lecture in Cambridge, England, that he had proved what is now called Fermat's Last Theorem.

The lecture audience burst into applause, and the announcement touched off a flurry of publicity, but then experts examining his 200-page proof found gaps in his logic. In December, Mr. Wiles said his proof of the famous theorem Pierre de Fermat devised in the 1630s was mostly correct, but one final calculation was ``not yet complete as it stands.''

Last week, Wiles sent about 20 colleagues in the mathematical community a revised proof, worked out in collaboration with Richard Taylor, a Cambridge University mathematician.

The problem is to prove the following proposition: The equation ``x to the nth power plus y to the nth power equals z to the nth power,'' where n is a whole number greater than 2, has no solution in which x, y, and z are positive whole numbers.

There are solutions if n equals 2: For example, 3 squared plus 4 squared equals 5 squared (also known as the Pythagorean Theorem). But if n equals 3 or more, according to Fermat, there are no solutions.

Wiles's latest proof has already been confirmed by a few experts, Princeton spokeswoman Jacquelyn Savani says, adding that Wiles has submitted the revised proof to the Annals of Mathematics, a Princeton-based scientific journal that formally reviews the validity of such technical proofs.

``This time, everything seems OK,'' Princeton mathematician Simon Kochen says. ``The proof has now been done in very great detail, and it now looks very firm.''

But mathematician Kenneth Ribet of the University of California, Berkeley, says it will be months before the proof is analyzed by enough mathematicians to be definitively pronounced right or wrong.

Did Fermat himself know the answer to his problem? A message he left for posterity indicates that he did. He wrote a mischievous note in the margin of a book saying he had found an ``admirable proof of this theorem, but the margin is too narrow to contain it.''