If $S$ is a subset of the set of the positive integers $\mathbb N$, we may consider the set $S^*$ of all products of elements of $S$, allowing for repeated factors —this is a multiset, really, in general. For example, if $S$ is the set of all prime numbers, then $S^*$ is simply $\mathbb N$, with all elements of multiplicity one —this is the fundamental theorem of arithmetic— and in fact this set $S$ is the only one with that property, so that this characterizes the set of prime numbers.

If $S$ is not the set of prime numbers, $S^*$ will have holes and there will probably be regions of $\mathbb N$ with extra density.

Are there standard useful ways to quantify how far from being the set of primes a set $S$ is in this sense, that is, how irregularly distributed is the set $S^*$ in $\mathbb N$?

There are sets $S$ with extremely irregular $S^*$. An example is the set of powers of a number. Once one has a qualitative measure of irregularity, one can make sense of the question:

If we pick a random set $S$ (for some sense of «random»), what is the expected irregularity?

From $S$ one can construct an "Euler product" $\zeta_S(s)=\prod\limits_{p\in S}\frac{1}{1-\frac{1}{p^s}}$ which is the Riemann zeta function if $S$ is the set of prime numbers. The function $\zeta_S$ is the Dirichlet enumerating function for the multiset $S^*$.

Are there analytic properties of the function $\zeta_S$ that characterize the set of primes among the other candidates for $S$?

Of course, $\zeta_S=\zeta$ iff $S$ is the set of primes, but I imagine there are much coarser conditions that one can put on $S$ that already imply the same conclusion.

The sort of thing one could imagine involves the distributions of values, of zeros, growth conditions, and so on. For example (tweaked after the comments of Steve and Greg below):

Does the Riemann Hypothesis hold for $\zeta_S$ iff $S$ is the set of primes up to a finite set?

3more comments