Actually, this theorem was proved by an English mathematician, Andrew Wiles, in the mid 1990's. It was one of the most famous "unsolved" problems in mathematics - remaining unproven for 358 years. Interestingly, Wiles himself almost gave up on his effort to prove it!!!
Here are some links to the theorem and to Wiles himself.
http://en.wikipedia.org/wiki/Fermat%27s_Last_Theorem#Wiles.27s_general_proof
http://en.wikipedia.org/wiki/Andrew_Wiles
Fermat's last theorem states that for natural numbers X,Y,Z,n with n>2 there are no solutions to the equation:
Xn+Yn=Zn
The first difficulty which occurs is that there are an infinite amount of natural numbers which means you can't check them all to prove this theorem. To make matters worse 'n' can also reach infinity which changes the entire nature of the equation. To the power three is a whole different equation than to the power four et cetera. It's practically impossible to fit them all in a neat little box like with a fixed 'n'. Hence most mathematical proofs which relate to this theorem only prove the theorem for a certain 'n'. Still it is seemingly impossible to get an overall proof which works for every 'n'.
In short infinite possibilities no known way of having an 'overall rule'.
Actually, this theorem was proved by an English mathematician, Andrew Wiles, in the mid 1990's. It was one of the most famous "unsolved" problems in mathematics - remaining unproven for 358 years. Interestingly, Wiles himself almost gave up on his effort to prove it!!!
Here are some links to the theorem and to Wiles himself.
http://en.wikipedia.org/wiki/Fermat%27s_Last_Theorem#Wiles.27s_general_proof
http://en.wikipedia.org/wiki/Andrew_Wiles