I was playing with some Meissel/Lehmer formulas and I found this one. In fact there is a much simpler way to find it when looking closer, so I guess i is well known.
$$\sum\limits_{p\leq x}\pi\left(\frac{x^2}{p}\right)-\sum\limits_{p\gt x}\pi\left(\frac{x^2}{p}\right)=\pi^2(x)$$
There is a similar formula I already explored in an other context (Goldbach).
$$\sum\limits_{p\leq x}\pi(\small 2x-p \normalsize)-\sum\limits_{p\gt x}\pi(\small 2x-p \normalsize)=\pi^2(x)$$
Any paper covering one of them? Were they used anywhere?
Edit: this seems to work also for $$\sum\limits_{p\leq x}\pi\left(\small\sqrt[k]{2 x^k-p^k}\normalsize\right)-\sum\limits_{p\gt x}\pi\left(\small\sqrt[k]{2 x^k-p^k}\normalsize\right)=\pi^2(x)$$ with $k\ge 1$
and for some $k\gt \gamma_x$ we even have
$$\sum\limits_{p}\pi\left(\small\sqrt[k]{2 x^k-p^k}\normalsize\right)=\pi^2(x)$$
To illustrate the influence of $k$, here is a chart with $k=1$ in blue, $k=2$ in purple and $k=16$ in yellow. $x=9$ in this example: wrapping arround $\pi^2(x)$
I guess there are a lot of other working formulas...