For even $w,$
$$ 1^w \equiv 3^w \equiv 5^w \equiv 7^w \equiv 1 \pmod 8. $$
I suppose there is a hidden induction in the even part, do it for $w=2,$ then $w=4,$ and so on.
No, wait, take $k$ odd and consider $k^{w/2}$ which is also odd. It is now one of four cases, $k^{w/2} \equiv 1,3,5,7 \pmod 8,$ which all lead to $$k^w = \left( k^{w/2} \right)^2 \equiv 1 \pmod 8.$$
At this stage, one may ask whether the fact that an odd number to any positive integer power is odd comes under the heading of induction. In one way it must, but if already proven in class or the book...
For odd $n,$ take $n=w+1,$ so
$$ 1^n \equiv 1, \; 3^n \equiv 3, \; 5^n \equiv 5, \; 7^n \equiv 7 \pmod 8. $$