<s>[INST] Can we show algebraically that this is true? This problem is part of a larger proof I've been working on. Long story short, I'm trying to prove a particular explicit formula for the recursive function
$$
t(p, 0) = 0 \\
t(p, k+1) = \left\lfloor \dfrac{t(p, k)}{3} \right\rfloor + p
$$
where $p=2n+1, n \in \mathbb{N}$. The inductive step of proving my particular explicit formula includes the following question:
Can we show algebraically that
$$ \left\lfloor \dfrac{1}{3} - \dfrac{1}{3} \left\lfloor \dfrac{2n-1}{2(3^{k-1})} + \dfrac{1}{2} \right\rfloor \right\rfloor \ \ = \ \ (-1) \left\lfloor \dfrac{2n-1}{2(3^k)} + \dfrac{1}{2} \right\rfloor$$
is true for all $k,n = 1, 2, 3, ...$ ? I used Python to test it and it seems to be true, at least for all $k≤1000, \ n≤1000$. Can anyone prove this rigorously? I tried using induction on $k$ but was not successful. I did not try induction on $n$.
Any help is appreciated.
 [/INST] 
Claim. Let $m,n$ be integers with $n>0$ and $x$ a real number. Then
$$\Bigl\lfloor \frac{-\lfloor x \rfloor+m}{n} \Bigr\rfloor = -\Bigl\lfloor \frac{x-m+n-1}{n} \Bigr\rfloor.$$

Proof.
We have
\begin{align}
\Bigl\lfloor \frac{-\lfloor x \rfloor+m}{n} \Bigr\rfloor 
&=\Bigl\lceil \frac{-\lfloor x \rfloor+m-n+1}{n} \Bigr\rceil\tag{1}\\
&=-\Bigl\lfloor \frac{\lfloor x \rfloor-m+n-1}{n} \Bigr\rfloor\tag{2}\\
&=-\Bigl\lfloor \frac{\lfloor x-m+n-1 \rfloor}{n} \Bigr\rfloor\tag{3}\\
&=-\Bigl\lfloor \frac{ x-m+n-1 }{n} \Bigr\rfloor\tag{4}
\end{align}
where we used well-known identities:

*

*$\left \lfloor \frac{n}{m} \right \rfloor = \left \lceil \frac{n-m+1}{m} \right \rceil$

*$\lfloor -x \rfloor=-\lceil x \rceil$ (see Proving that the $\lfloor-x\rfloor= -\lceil x\rceil$)

*$\lfloor x+m \rfloor=\lfloor x \rfloor +m$ (see Find the value of $\lfloor x+y \rfloor$ where $x \in \mathbb{R}$, $y \in \mathbb{Z}$)

*$\lfloor \frac{\lfloor x \rfloor}{n} \rfloor = \lfloor \frac{x}{n}\rfloor$ (see How to prove or disprove $\forall x\in\Bbb{R}, \forall n\in\Bbb{N},n\gt 0\implies \lfloor\frac{\lfloor x\rfloor}{n}\rfloor=\lfloor\frac{x}{n}\rfloor$.)

$\square$
Set $m=1,n=3,x=\dfrac{2n-1}{2(3^{k-1})} + \dfrac{1}{2}$ to get your result.
Note. Adding the ceiling version of the claim as an exercise and to make search engines happy (same $m,n,x$ restrictions):
$$
\Bigl\lceil \frac{-\lceil x \rceil+m}{n} \Bigr\rceil = -\Bigl\lceil \frac{x-m-n+1}{n} \Bigr\rceil.
$$
</s>