I have the following problem:
Given $k\geq 1$, find $h$ such that
$$2^h \frac{4^k-1}{3}-1 \equiv 0 ~(\text{mod}~3).$$
This is my attempt using the invariance of multiplication:
$$2^h \frac{4^k-1}{3} \equiv 1 ~(\text{mod}~3) \Rightarrow 2^h \frac{4^k-1}{3}\cdot3 \equiv 1\cdot3 ~(\text{mod}~3) \Rightarrow 2^h(4^k-1) \equiv 0 ~(\text{mod}~3)$$
Since I know that
$$4^k - 1 \equiv 0 ~(\text{mod}~3) $$
then I can conclude that
$$\forall k, \forall h, 2^h(4^k-1) \equiv 0 ~(\text{mod}~3)$$
Anyway, this seems really wrong, since if I choose $h=3$ and $k=1$, then I get:
$$2^3 \frac{4^1-1}{3}-1 = 7 \not\equiv 0 ~(\text{mod}~3).$$
What's wrong with this proof?
Hint:
$\dfrac{4^k-1}3=1+4+4^2+\dots+4^{k-1}=k \pmod 3$ and using $2^h=(-1)^h$ you get $(-1)^h=k \pmod 3$ for solutions.