Prove that $3^x + 3^{x-2}$ ends with $0$ for any integer $x > 1$

I think that $3^x+3^{x-2}$ ends in a $0$ (i.e. is divisible by $10$) $\forall x \in \Bbb Z, x > 1$.

Examples:

$3^2+3^{2-2}=9+1=10 \\ 3^3+3^{3-2}=27+3=30 \\ 3^4+3^{4-2}=81+9=90 .$

In fact, I wrote a quick Python program and left it on overnight, it reported every number in the domain working.

I don't know a proof for this, though, and I also don't know if it's already a theorem or something with a fancy name that I just happened to stumble across.

Also, I don't know any really good tags for this. If you know one, please comment or edit the post.

• Actually, $81 + 9 = 90$ :) – rewritten Jan 23 '16 at 20:06
• @rewritten Oh, you're right. Surprised nobody found that before, haha – Quelklef Jan 23 '16 at 20:07

Let $x \geq 2$ be an integer. Note that $$3^x+3^{x-2}=3^{x-2}(3^2+1)=3^{x-2} \cdot 10$$
$3^{x} + 3^{x - 2} = 3^{x}(1 + 3^{-2}) = 3^{x}({10}/{9}) = (3^{x}/9)(10)$ The value is always a multiple of 10 since for x ≥ 2 we always have an integer value. The proof is complete.
$1+9=10$
$3+7=10$
And what powers make numbers that end in $1,3,9, 7, 1, 3\cdots$