# Analytic varieties for the primes and the twin primes

I am wondering what real and complex analysis say about the primes and twin primes.

According to Wikipedia

analytic variety is defined locally as the set of common zeros of finitely many analytic functions

Let

$$P(x) = \sin^2(\pi x) + \sin^2( \frac{\pi \cdot (\Gamma(x)+1)}{ x})$$

The real roots of $P(x)$ greater than one are exactly the primes. Since it is a sum of squares, both terms must vanish. $\sin(\pi x)$ vanishes at integers and the second term is Wilson's primality test.

Let $P_2(x) = P(x)^2 + P(x+2)^2$.

The real roots of $P_2(x)$ greater than one are exactly the smaller twin of twin primes.

I believe $P(x)$ is of no practical interest since $\Gamma(x)$ grows prohibitively fast.

Q1 Are there computationally better real functions with zeros exactly the primes?

Prime (resp. twin prime) counting is counting the zeros of $P(x)$ (resp. $P_2(x)$).

Q2 Does analysis give bounds for the number of zeros in an interval?

Q3 Are some properties of the complex roots of $P(x)$ known?

The complex XRays look messy to me.

The primes appear to be zeros of multiplicity $2$.

Plot:

-