[qbxnenkp] Randomness from primes

September 15, 2019

Create a random number generator based on the distribution of prime numbers.

Some simple possibilities, not necessarily good random number generators:

Take consecutive primes and generate bits based on remainders mod 3, mod 4, or mod 6.

Generalization of the above: instead of all the primes from the consecutive integers, primes from an arithmetic sequence.

Use the prime number theorem to define intervals in which the expected number of primes in each interval is 0.5, count the actual number of primes, and generate bits.

Share this

Related Posts

Previous
Next Post »