I was reading one of the Fermat theorem proof from the wikipedia
Specifically the theorem: " If $2^{k}+1$ is an odd prime, then $k$ is a power of 2."
In the proof it says:
Substituting $a=2^{r}$,$b=-1$,$b=-1$, $m = s$ and using that $s$ is
odd
I originally thought that we could have used $a=2^s$ and $m=r$ and it seemed to me it should work too, but I was wondering if I am misunderstanding something as that statement there using that s is odd
I am not sure if it means something more and would create a problem with a different substitution
Best Answer
Using your substitution of $a = 2^{s}$ and $m = r$ instead, then if $r = 1$, this means $s = k$ so this gives
$$a^{m} - b^{m} = \left(2^{k}\right)^{1} - (-1)^{1} = 2^{k} + 1 \tag{1}\label{eq1A}$$
This then just states $2^{k} + 1 \mid 2^{k} + 1$, so it doesn't help with checking whether or not $2^{k} + 1$ is prime. However, if $r \gt 1$, then if $r$ is odd, it will also work just like it does with $s$. If $r$ is even instead, though, this then gives
$$a^{m} - b^{m} = \left(2^{s}\right)^{r} - (-1)^{r} = 2^{rs} - 1 = 2^{k} - 1 \tag{2}\label{eq2A}$$
However, the value being checked on is $2^{k} + 1$ instead.
Since using an odd factor $\gt 1$ is required to prove the divisibility requirement of $2^{k} + 1$ by a smaller value than itself, and $s$ meets this requirement, it's simpler & easier to just use this rather than unnecessarily breaking the proof down into additional cases trying to use $r$ instead in some situations. This is most likely why the proof in Wikipedia is done as it's shown.