Given that $k \equiv 3 \pmod 8$, determine the least residue of $$3k^{333} + 23^{999} \pmod 8.$$
So I've done some checking and I know that $3(3^{333})\equiv$ 1(mod8). (I checked it with a power mod calculator and proved it by reducing the exponent (mod8)) I've also checked that $23^{999}\equiv$ 7(mod8), but I can't seem to be able to prove it. Any hints for how to reduce the power of 23?
Use the fact $$23^4\equiv 1 \pmod 8$$
This we get from Euler theorem $$a^{\phi(n)}\equiv 1 \pmod n$$ if $a$ and $n$ are relatively prime, where $\phi (n)$ is a number of natural numbers that are smaler than $n$ and relative prime to $n$
Of course you don't really need Euler theorem for this. Just notice that $$23\equiv -1 \pmod 8$$