About the RH seen as a minimization problem, see the [Nyman-Beurling-Baez-Duarte criterion](https://arxiv.org/pdf/1705.09918.pdf). The major idea with this approach is that we don't even need to mention the primes.

We start from 

> RH is true iff for every $\Re(s) > 1/2$ : $$\lim_{N \to \infty} 1-\zeta(s)\sum_{n=1}^N \mu(n) n^{-s} = 0$$ 


that we can generalize with 

> RH is true iff there is a sequence of Dirichlet polynomials $A_N(s) =\sum_{n=1}^N a_{n,N} n^{-s}$ such that for every $\Re(s) > 1/2$ : $$\lim_{N \to \infty} 1-\zeta(s)A_N(s) = 0$$
the convergence being locally uniform,

which leads to


$$\lim_{N \to \infty} \int_{\sigma-i\infty}^{\sigma+i\infty} \frac{|1- \zeta(s)A_N(s)|^2}{|s(s-1)|} ds = 0, \qquad (\sigma > 1/2)$$ 

And with some work, looking carefuly at $\sum_{n=1}^N \mu(n) n^{-1/2-it}$ under the assumption that RH is true, we  obtain that $\sigma = 1/2$ works, ie.

> RH is true iff there is a sequence of Dirichlet polynomials such that
$$\lim_{N \to \infty} \int_{-\infty}^{\infty} \frac{|1- \zeta(1/2+it)A_N(1/2+it)|^2}{t^2+1/4} dt = 0$$