# Prove that for any $a$ and $n > 2$, the last two digits of $a^n$ can not be $30$

I'm confused on how to prove this. I know if I test it out with small numbers it doesn't end up with the last two digits to being 30. But how about larger numbers with larger exponents? Can someone show me how to prove this?

If the last two digits of $$a^n$$ were $$30$$, then $$a^n$$ would be divisible by $$10$$.
But then $$a$$ would be divisible by $$10$$.
But then $$a^n$$ for $$n\ge2$$ would be divisible by $$100$$, so the last two digits of $$a^n$$ would be $$00$$.
• prime factorization: $10=2\times5$ – J. W. Tanner Feb 20 '20 at 21:55
If you talk about $$a^n$$, it is indeed true. You have $$30 = 2 * 3 * 5$$. Let $$a = 2^\alpha q$$ where $$q$$ is relatively prime to $$2$$. Then $$a^n = 2^{n\alpha} q^n$$. So for all $$k\in \mathbb{Z}$$, $$a^n + 100k$$ will be prime to $$2$$ if $$\alpha = 0$$ and divisible by $$4$$ if $$\alpha > 0$$. So $$a^n + 100k$$ cannot equal $$30$$, and the two last digits of $$a^n$$ cannot be $$30$$. You only need $$n \geq 2$$.