Applications of class number There is the notion of class number from algebraic number theory. Why is such a notion defined and what good comes out of it?
It is nice if it is $1$; we have unique factorization of all ideals; but otherwise?

We say that a prime p is regular if it does not divide the class number of the p-th cyclotomic field. For regular primes, it is easy to prove Fermat's last theorem, as outlined for instance in Milne's notes.
Basically, everything would be easy if the class number was 1, in which case one could use unique factorization. If the class number is prime to p, you use the fact that every ideal whose p-th power is principal must itself be principal. This, together with unique factorization for ideals, turns out to be all that you need in the naif proof.
