Kindayr said:
Either [itex]p|(a^{m}+1)[/itex] or [itex]p|(a^{m}-1)[/itex]. If it is the latter, then [itex]p|(a^{m}-1)[/itex] implies that [itex]a^{m}\equiv 1\mod p[/itex], but that would mean that the order of [itex]a[/itex] is [itex]m[/itex], which contradicts the fact that [itex]a[/itex] is a generator of [itex]\mathbb{Z}_{p}^{\times}[/itex]. Hence, it must be that [itex]a^{m}\equiv -1\mod p[/itex].
well, you know, that's ok, but the thing is, we don't really care which factor p divides, so long as we know that p divides one of them. the point is:
k = (a
m - 1)(a
m + 1)/p
we're trying to prove something about k, here: gcd(k,p) = 1.
could k be 0? well, that would mean one of our factors is 0, but surely a > 1.
and if 1 ≤ k < p, as you yourself already noted, gcd(k,p) = 1.
so if k ≥ p, the only way gcd(k,p) ≠ 1, is if p|k.
and that's what we want to show "can't happen".
now, for ANY positive integer n, and any ODD prime, can p divide both n and n+2?