I often have to generate random prime numbers so I created this simple utility that does it for me. It lets you generate as many random primes as you need from the given range. It works in the browser and is powered by alien technology from the future.
Random Prime Generator Options
Random Prime Generator Examples (click to try!)
23 7 19 97 79 53 59 3 89 29
1453369, 1438169, 1770679, 1450103, 1767397, 1156171, 1306597, 1950449, 1842941, 1662553, 1637521, 1018177, 1569181, 1924547, 1978589, 1543429, 1396103, 1247527, 1811647, 1798631
10111 101111 10 11 11111 10001
How Does This Random Prime Generator Work?
start and ending with
end (range values specified in options). These are all numbers that are not divisible by 2 or 3. Then, it uses the
Math.random() function to select random values from this list and calls the
isPrime() function to check whether this number is actually a prime. It repeats this process until the output list has as many primes as you specified in the
count option. Finally, it uses the
join() function to separate all randomly selected primes by the specified
separator character in options.
Created by Browserling
This random prime generator was created by me and my team at Browserling. Behind the scenes, it's actually powered by Browserling's programmer tools that are used by millions of people every month. Browserling itself is an online cross-browser testing service powered by alien technology. Check it out!
Secret message: If you love my tools, then I love you, too! Use coupon code COMLING to get a discount at my company Browserling.