TITLE: Do powers of 256 all end by 6 and if so, how to prove it?
QUESTION [16 upvotes]: I computed the 10 first powers of 256 and I noticed that they all end by 6.
256^1 = 256
256^2 = 65536
256^3 = 16777216
256^4 = 4294967296
256^5 = 1099511627776
256^6 = 281474976710656
256^7 = 72057594037927936
256^8 = 18446744073709551616
256^9 = 4722366482869645213696
256^10 = 1208925819614629174706176

My intuition is that it is the same for all powers of 256 but I can't figure out how to prove it, any suggestion?
My attempt was to show that $\forall n$ there is a $k$ such that $2^{8n} = k*10 + 6$, $k$ and $n$ being non null integers. I tried to decompose the right member in powers of $2$ but that leaves me stuck.

REPLY [2 votes]: We can prove this by complete induction:
For $n = 1$, we have $256^n = 256^1 = 256$, which ends with a $6$. 
Now, let $256^n$ end with a $6$, so there is an integer $k \ge 0$ such that $256^n = 10k+6$ and we have
$$256^{n+1} = 256(10k+6) = 2560k+1536 = 10(256k+153)+6$$
Therefore, $256^{n+1} = 10k'+6$ with $k'=256k+153$, and so also $256^{n+1}$ ends with a $6$.