For $k\ge0$ and integer
Given this function $f(k)=\frac{1}{2}(3^k-1)$
Which is equal to this recurrence relation $f(k)=3f(k-1)+1$
It follows that $f(k-1)=\frac{f(k)-1}{3}$
But I am also told that $f(k-1)=\left\lfloor\frac{f(k)}{3}\right\rfloor$
I am not sure how the last equality is true.