# Constructing a smooth function whose roots consist only of each of the primes.

My first attempt:

$$f(x) = \prod_{i=1}^\infty \left(1- \frac x {p_i} \right)$$

If we take a look at the Riemann zeta function:

$$\zeta(s) = \sum_{n = 1}^\infty \frac 1 {n^s} = \prod_{i = 0}^\infty \left(\frac {1}{1 - p_i^{-s}} \right) = \prod_{i = 0}^\infty \left(1 - \frac {1}{p_i^{s}} \right)^{-1}$$

$$f(1) = \frac 1 {\zeta(1)} = 0$$

By $f$'s construction, it should only contain $0$ factors at prime $x$s, which $1$ is not. Therefore, the only reason $f$ should be $0$ at $1$ is that the product converges to $0$ as $i \to \infty$.

My second attempt:

$$g(x) = \prod_{i=1}^\infty \left(1- \frac {x^2} {p_i^2} \right)$$

However, I have no real idea how to show that this second attempt does not converge to $0$ on non-prime values of $x$. How do I show that either $g(x)$ converges to $0$ at some non-prime point $c$, or show that $g(x)$ is only $0$ for prime values $x$?

• You might want to call $f'$ as $g$ instead, given that we're talking about derivatives. Commented Mar 20, 2016 at 0:44
• Please ignore that the second attempt includes negative primes. Commented Mar 20, 2016 at 0:44
• @MattSamuel I can imagine a simpler spline that rests on the $y = 1$ line until it approaches the next prime and curves nicely down to meet it. However, the question is in regards to $g(x)$ and how to so that it meets these properties or doesn't. Commented Mar 20, 2016 at 0:47
• $\displaystyle \ln g(x) = \sum_{i=1}^\infty \ln(1 - x^2/p_i^2) = -\sum_{i=1}^\infty \sum_{k=1}^\infty \frac{x^{2k}}{k p_i^{2k}} = -\sum_{k=1}^\infty \frac{x^{2k}}{k} \sum_{i=1}^\infty p_i^{-2 k}$ Commented Mar 20, 2016 at 1:02
• You might want to look at en.wikipedia.org/wiki/Weierstrass_factorization_theorem Commented Jun 7, 2016 at 7:36

A possible construction is $$\prod \left(\bigg(1-\frac{x}{p_i}\bigg) e^{\frac{x}{p_i}}\right).$$
Say, for $p_i>2|x|$, $$\log \left(\bigg(1-\frac{x}{p_i}\bigg) e^{\frac{x}{p_i}}\right) = O\left(\frac{|x|^2}{p_i^2}\right),$$ This ensures that the tail of the product converges and the limit is nonzero.