The important fact is that, we can factor:

where is odd.

Now, assume,

is prime where is divisible by odd.

Then,

Thus,

Can be factored as,

It has a proper nontrivial factorization, thus it cannot be prime.

Thus, cannot be divisble by odd number that is,

Thus,

Which were studied by Fermat (my favorite mathemation).