# Prove that $5^n - 2^n$ is divisible by $3$ for all nonnegative integers $n$ using mathematical induction [duplicate]

Using mathematical induction, prove for all integers n 1 that $5^n - 2^n$ is divisible by 3.

Can someone help me with this?

-

## marked as duplicate by Inceptio, Martin, Git Gud, Dominic Michaelis, SharkosMay 26 '13 at 9:27

The answer here on Why is every answer of $5^k - 2^k$ divisible by 3? has an induction approach. – Inceptio May 26 '13 at 9:16
@1ftw1 Related. – Git Gud May 26 '13 at 9:20
I guess you mean nonnegative integers $n$. I've edited the title. – azimut May 26 '13 at 9:21

Hint: Note that $5^{n+1}-2^{n+1} = 5\cdot 5^n - 2\cdot 2^n = 5(5^n-2^n) + 3\cdot2^n$.
This one could be solved by induction but is it much neater if you use that $a^n-b^n = (a-b) \cdot \sum_{i=0}^{n-1} a^i\cdot b^{n-1-i}$ If you use this one in your problem you see that $5^n- 2^n = (5-2) \cdot \sum_{i=0}^{n-1} 5^i \cdot 2^{n-1-i}=3 \cdot \sum_{i=0}^{n-1} 5^i \cdot 2^{n-1-i}$ Which can be dived by $3$.
If you really want to use Induction use that $5=3+2$ (ok this hint seems ridicolous it shall be used like this) $5^{n+1} - 2^{n+1} = (3+2) \cdot 5^n - 2 \cdot 2^n= 3 \cdot 5^n+ 2(5^n-2^n)$