Consider $p$ is a prime odd number and $n$ is an integer positive number.
My question: Is there a condition over parameters $p$ and $n$ such that $p^n \equiv1\pmod{4}$ ?
Thanks for any suggestions.
Consider $p$ is a prime odd number and $n$ is an integer positive number.
My question: Is there a condition over parameters $p$ and $n$ such that $p^n \equiv1\pmod{4}$ ?
Thanks for any suggestions.
Since $p$ is odd, either $p = 4k+1$ or $p=4k-1$ for some $k$. Applying the binomial theorem, we see that in the former case, $$ p^n = (4k+1)^n = 1+ \sum_{j=1}^n \binom{n}{j} (4k)^j \equiv 1 \, (\text{mod } 4), $$ so the required condition holds for all such primes. In the latter case, $$ p^n = (4k-1)^n = (-1)^n + \sum_{j=1}^n \binom{n}{j} (4k)^j (-1)^{n-j} \equiv (-1)^n \, (\text{mod } 4), $$ so $n$ should be even.