Prove that $3^k+6k-1$ is divisible by 4.
I can prove this sort of thing using induction, but wanted to learn how to do it with modular arithmetic. I am by no means fluent with modular arithmetic, so sorry if this is very easy, I am just familiar with the basics.
Any help would be appreciated, thanks!
Modulo $4$, the expression is equivalent to $(-1)^k+2k-1$. Since $k$ is an integer $k$ is even or $k$ is odd. If $k$ is even, then $k=2m,m\in\mathbb{Z}$. Hence the expression is equivalent to $(-1)^{2m}+2(2m)-1 =4m\equiv 0\pmod 4$. Similarly, if $k$ is odd, $k=2m+1$ and the expression is equivalent to $(-1)^{2m+1}+2(2m+1)-1=-2+4m+2=4m\equiv 0\pmod 4$. Therefore the expression is always divisible by $4$.