I don't know if this is research level or math se level so I try posting here first.
The problem is to prove that the left hand side equals the right hand side for $t>0$ when leaving out singularities such as the points $t$ equal to the imaginary part of a Riemann zeta zero:
$$\left\lfloor \frac{t \log \left(\frac{t}{2 e \pi }\right)}{2 \pi }+\frac{7}{8}\right\rfloor +\frac{1}{2} \left(-1+\text{sgn}\left(\Im\left(\zeta \left(i t+\frac{1}{2}\right)\right)\right)\right)=\frac{\vartheta (t)+\Im\left(\log \left(\zeta \left(i t+\frac{1}{2}\right)\right)\right)}{\pi }$$
Can you prove that the left hand side essentially equals the right hand side for $t>0$ when not considering the singularities?
$\text{sgn}$ is the sign function and the floor function is the down square brackets. $\zeta(s)$ is the Riemann zeta function and $\vartheta(t)$ is the Riemann Siegel theta function.
Two plots to verify the similarity between the left hand side and the right hand side:
(*Mathematica 8*)
Plot[(Sign[Im[Zeta[1/2 + I*t]]] - 1)/2 +
Floor[t/(2*Pi)*Log[t/(2*Pi*Exp[1])] + 7/8], {t, 0, 60},
Filling -> 0]
Left hand side:
(*Mathematica 8*)
Plot[(RiemannSiegelTheta[t] +
Im[Log[Zeta[1/2 + I*t]]])/Pi, {t, 0, 60}, Filling -> 0]
Right hand side:
Related: https://oeis.org/A135297