## 3 Results and Discussion
### Length-Agnostic Statistical Validation  
In this section, we present a length-agnostic approach to assess the statistical quality of the prime RNG output based on observing the probability of measurements falling below a given threshold. Since prime numbers are not uniformly distributed in the set of natural numbers \(\mathbb{N}\), searching for the presence of patterns in the RNG output is not a trivial task. Statistical test suits, such as the one from NIST [1], typically certify randomness by expecting uniformly distributed sequences and simply test for deviations from this assumption. Moreover, for larger prime lengths, collecting and testing a sufficiently representative sequence can quickly become unfeasible due to the vast number of possible outcomes and the computational precision required to represent these values. Most statistical evaluations will be increasingly complex for larger prime lengths, making their implementation unfeasible. Nonetheless, it should be possible to establish a threshold, \(p_{\text{th}}\), such that any given \(n\)-bit prime distribution can be mapped into two equiprobable bins, each containing half of all possible outcomes. An unbiased prime RNG should then yield a uniformly distributed binary sequence that can be tested by a randomness test suite. Unfortunately, it is not feasible to calculate the exact value of the prime-counting function, \(\pi(x)\), for any arbitrary \(x\). Instead, lower and upper bounds, \(\pi_{\text{min, max}}(x)\), must be established [38]:  
\[\pi(x) \geq\frac{x}{\log x}\Big{(}1+\frac{1}{\log(x)}+\frac{1.8}{\log^{2 }(x)}\Big{)}\quad\text{for }x\geq 32299 \tag{5}\] \[\pi(x) \leq\frac{x}{\log x}\Big{(}1+\frac{1}{\log(x)}+\frac{2.51}{\log^{ 2}(x)}\Big{)}\quad\text{for }x\geq 355991.\]  
Since \(\pi(x)\) is not a bijective function, \(p_{\text{th}}\) will also have to be estimated and thus presents associated uncertainty bounds, \(p_{\text{th}}^{\text{min, max}}\). For any \(k=\pi(x)\)[39]:  
\[p_{k} <k\Big{(}\log(k)+\log\log(k)-1+\frac{\log\log(k)-2}{\log(k)}-\frac {(\log\log(k))^{2}-6\log\log(k)+10.667}{2\log^{2}(k)}\Big{)}\quad\text{for }x\geq 46254381 \tag{6}\] \[p_{k} >k\Big{(}\log(k)+\log\log(k)-1+\frac{\log\log(k)-2}{\log(k)}-\frac {(\log\log(k))^{2}-6\log\log(k)+11.321}{2\log^{2}(k)}\Big{)}\quad\text{for }x\geq 2.\]  
Consequently, given a certain probability \(r\) that a \(n\)-bit prime number is below \(p_{\text{th}}\), the expected interval for the number of measurements below the threshold, \(I_{\text{min, max}}\), can be estimated through Equation (5):  
Figure 6: Representative output distribution of 10 M 32-bit prime numbers for the (**a**) CS and (**b**) implemented vacuum-based QS both in the raw and uniformized scenarios. In (**c**), the 32-bit prime distributions for the uniformized sources are highlighted. \[I_{\text{min, max}}=(1-r)\pi_{\text{min, max}}(2^{n-1})+r\pi_{\text{min, max}}(2^{n}-1). \tag{7}\]  
Since there is uncertainty in determining \(p_{\text{th}}\), there is also a maximum expected interval for the proportion of measurements below the threshold, \(r_{\text{min, max}}\), which can be numerically calculated using the bounds in Equation (6):  
\[r_{\text{min, max}}=\frac{\pi_{\text{min, max}}(p_{\text{min, max}}^{\text{min, max}})-\pi_{\text{max, min}}(2^{n-1})}{\pi_{\text{max, min}}(2^{n}-1)-\pi_{\text{max, min}}(2^{n-1})}. \tag{8}\]  
After dividing the distribution of number primes, finding a proportion of outcomes outside the calculated probability interval, \(r_{\text{min, max}}\), is a strong indicator that the sequence under test is biased. Moreover, since the output measurements are mapped into binary sequences, this approach has the advantage of not increasing in complexity for larger prime lengths, which allows the statistical validation of all prime lengths considered. Here, we have applied this mapping, with a threshold probability of 0.5, to the output of the uniformized CS and QS. In Figure 7a, the normalized autocorrelation coefficients for the binary threshold values of 10 M 32-bit prime numbers are shown.