In many places it is said that the last digits of the powers of the numbers from 1 to 9 have certain cycles. For example the last digits of powers of 2 repeat in a cycle of $4, 8, 6, 2$, and the last digits of powers of 9 repeat in a cycle of $1, 9$.
It seems like this works for bigger numbers as well. The last digits of any number's powers seem follow the cycle of the number's last digit's cycle. For example, the cycle of the last digits of powers of 7 is $9, 3, 1, 7$, and the cycle of the last digits of powers of 1097 are $9, 3, 1, 7$. I've been experimenting with my calculator and I haven't found a single counterexample, so my guess is that it's true for all numbers. That is, the last digits of powers of a number $n$ follow the same cycle as the last digits of the number $n$'s last digit's powers. Could someone show me a proof of this?