algorithm that generates a sequence of numbers whose properties approximate those of sequences of true random numbers
A pseudorandom number generator (PRNG), also known as a deterministic random bit generator (DRBG), is an algorithm for generating a sequence of numbers whose properties approximate the properties of sequences of random … Wikipedia
🌐
Wikipedia
en.wikipedia.org › wiki › Pseudorandom_number_generator
Pseudorandom number generator - Wikipedia
February 7, 2026 - A pseudorandom number generator (PRNG), also known as a deterministic random bit generator (DRBG), is an algorithm for generating a sequence of numbers whose properties approximate the properties of sequences of random numbers. The PRNG-generated sequence is not truly random, because it is ...
🌐
GeeksforGeeks
geeksforgeeks.org › dsa › pseudo-random-number-generator-prng
Pseudo Random Number Generator (PRNG) - GeeksforGeeks
December 30, 2022 - Pseudo Random Number Generator(PRNG) refers to an algorithm that uses mathematical formulas to produce sequences of random numbers. PRNGs generate a sequence of numbers approximating the properties of random numbers.
Discussions

ELI5: How does a random number generator work?
There are two types of random number generators. The first type is called pseudorandom number generator (PRNG). These don't actually generate random numbers, just numbers that have a "pretty good" variability. PRNGs can be pretty simple, like 1 or 2 lines of code and mostly involving basic arithmetic. They usually have patterns that are pretty easy to find after a while, so they aren't considered secure. There's no magic here. These are just equations that humans can't easily predict the next output of. More modern computers have actual random number generators, that use hardware sources of random data (like random bits being flipped based on thermal energy) to create input into a cryptography system, which is able to create nearly uniform random numbers. These are a lot more secure, because they rely on physical entropy to input random data into the system. More on reddit.com
🌐 r/explainlikeimfive
110
508
November 4, 2023
Pen and paper pseudo-random number generator - Mathematics Stack Exchange
tl;dr How can I generate pseudo-random numbers using only pen and paper? Uniform distribution (or as close as possible) It's pen writing on paper; can't cut, fold, throw or anything like that I'm More on math.stackexchange.com
🌐 math.stackexchange.com
September 9, 2019
Combinator Pseudo Random Number Generator : factorio
Community-run subreddit for the game Factorio made by Wube Software. More on old.reddit.com
🌐 r/factorio
My first scheme project: a pseudo random number generator
(lambda (. args) ... works only in Guile. But (lambda (a . args) ... ) in every Scheme. Also (define (rndx-0ary) #|the code|# ) (define (rndx-Nary a . args) #|preamble, the code|# (case a ((bla) ...) ((bla-bla) (apply bla-bla-proc args)) (else #f)))) (define-syntax Rnd (syntax-rules () ((_) (rndx-0ary)) ((_ arg ...) (rndx-Nary arg ...)))) EDIT: or simple use case-lambda form 2. Particular procedure SuperMegaNutter_b7 are 'estimating Pi Using Monte Carlo' compatible. It is good! More on reddit.com
🌐 r/scheme
1
4
September 30, 2023
🌐
CalculatorSoup
calculatorsoup.com › calculators › statistics › random-number-generator.php
Random Number Generator
January 27, 2026 - Random number generator for numbers 0 to 1,000,000. Generate positive or negative random numbers or random number lists with repeats or no repeats.
🌐
Harvard SEAS
people.seas.harvard.edu › ~salil › pseudorandomness › prgs.pdf pdf
7 Pseudorandom Generators 7.1 Motivation and Definition
H(x), then G is an (m,1/m) pseudorandom generator. ... Definition 7.26. An unbounded fan-in circuit C(x1,...,xn) has input · gates consisting of variables xi, their negations ¬xi, and the constants · 0 and 1, as well as computation gates, which can compute the AND · or OR of an unbounded number of other gates (rather than just 2, as
🌐
University of Arizona Mathematics
math.arizona.edu › ~tgk › mc › book_chap3.pdf pdf
Chapter 3 Pseudo-random numbers generators 3.1
learn how to write your own random number generator. I do not recommend writing your · own generator. I also do not recommend blindly using whatever generator comes in the · software package your are using. From now on we will refer to pseudo random number
🌐
Quora
quora.com › Can-you-provide-some-examples-of-pseudo-random-number-generators-and-explain-how-they-function
Can you provide some examples of pseudo-random number generators and explain how they function? - Quora
Answer: Of course! Pseudo-random number generators (PRNGs) are tools that produce numbers that look random, but they’re actually created using a specific formula. They’re not truly random, but for most uses, they’re close enough.
🌐
Python documentation
docs.python.org › 3 › library › random.html
random — Generate pseudo-random numbers
3 weeks ago - Almost all module functions depend on the basic function random(), which generates a random float uniformly in the half-open range 0.0 <= X < 1.0. Python uses the Mersenne Twister as the core generator.
Find elsewhere
🌐
RANDOM.ORG
random.org
RANDOM.ORG - True Random Number Service
List Randomizer will randomize a list of anything you have (names, phone numbers, etc.) String Generator makes random alphanumeric strings Password Generator makes secure passwords for your Wi-Fi or that extra Gmail account Clock Time Generator will pick random times of the day Calendar Date Generator will pick random days across nearly three and a half millennia Geographic Coordinate Generator will pick a random spot on our planet's surface Bitmaps in black and white Hexadecimal Color Code Generator will pick color codes, for example for use as web colors Pregenerated Files contain large amounts of downloadable random bits Pure White Audio Noise for composition or just to test your audio equipment Jazz Scales to practice improvisation for students of jazz guitar Samuel Beckett's randomly generated short prose DNA Protein Sequence Randomizer (at Bio-Web)
🌐
MDPI
mdpi.com › home › journals › applied sciences › volume 12 › issue 7 › 10.3390/app12073377
Dynamical Pseudo-Random Number Generator Using Reinforcement Learning | MDPI
March 26, 2022 - There are two ways of obtaining random numbers: using the randomness of physical phenomena (non-deterministic random bit generator, NRBG) [4] and generating pseudo-random numbers of a far longer length by adding a short initial value to the deterministic algorithm (deterministic random bit generator, DRBG) [5]. In the case of the NRBG, generated pseudo-random numbers may show a relatively high level of entropy, similarly to true random numbers, but it is not easy to obtain jobs of a high-level entropy and apply them to various platforms.
🌐
Oracle
docs.oracle.com › en › java › javase › 17 › core › pseudorandom-number-generators.html
Pseudorandom Number Generators
October 20, 2025 - They create a series of numbers based on a deterministic algorithm. The most important interfaces and classes are RandomGenerator, which enables you to generate random numbers of various primitive types given a PRNG algorithm, and RandomGeneratorFactory, which enables you to create PRNGs based on characteristics other than the algorithm's name.
🌐
Computer Security
textbook.cs161.org › crypto › prng.html
Pseudorandom Number Generators | Computer Security
A pseudorandom number generator (pRNG) is an algorithm that takes a small amount of truly random bits as input and outputs a long sequence of pseudorandom bits.
🌐
IEEE Xplore
ieeexplore.ieee.org › document › 10557718
Pseudo-Random Number Generators for Stochastic Computing (SC): Design and Analysis | IEEE Journals & Magazine | IEEE Xplore
This article introduces a novel approach for pseudo-random number generators (RNGs) to be used in SNGs. The proposed RNG design leverages the inherent randomness between each bit of data to generate larger sets of random numbers by concatenating the modules of the customized linear feedback ...
🌐
leventozturk
leventozturk.com › engineering › random
Online Pseudo Random Number Generator Mersenne Twister, WELL, CryptMT Levent Ozturk
This online tool generates pseudo random numbers based on the selected algorithm. A random number generator (RNG) is a computational or physical device designed to generate a sequence of numbers or symbols that lack any pattern, i.e. appear random.
🌐
Cppreference
en.cppreference.com › w › cpp › numeric › random.html
Pseudo-random number generation - cppreference.com
February 10, 2025 - A random number engine (commonly shortened to engine ) is a uniform random bit generator which generates pseudo-random numbers using seed data as entropy source.
🌐
Reddit
reddit.com › r/explainlikeimfive › eli5: how does a random number generator work?
r/explainlikeimfive on Reddit: ELI5: How does a random number generator work?
November 4, 2023 - Once somebody sees the whole pattern ... this: Take the whole space of available numbers (which, depending on the data type you're using, can have a lot of range) and order them in a way that a person can't predict what comes next...
🌐
NIST CSRC
csrc.nist.gov › glossary › term › pseudorandom_number_generator
pseudorandom number generator - Glossary | CSRC
The DRBG produces a sequence of ... the output is unpredictable given that the seed is not known. A DRBG is sometimes also called a pseudo-random number generator (PRNG) or a deterministic random number generator....
🌐
Gurobi
support.gurobi.com › hc › en-us › articles › 26988754022545-What-is-a-pseudorandom-number-generator
What is a pseudorandom number generator? – Gurobi Help Center
1 month ago - Gurobi relies on a pseudorandom number generator (PNRG) to allow for behavior which is both random and deterministic.A PRNG is an algorithm designed to produce a sequence of numbers that approximat...
🌐
Calculator.net
calculator.net › home › math › random number generator
Random Number Generator
A random number generator, like the ones above, is a device that can generate one or many random numbers within a defined scope. Random number generators can be hardware based or pseudo-random number generators.
Top answer
1 of 3
1

I would use a linear congruential generator. Given a seed $X_n$ it returns $X_{n+1}=aX_n+c \pmod m$ for parameters $a,c,m$. I would then take some low order bits of $X_{n+1}$ as the random number. The calculation is not much even with pen and paper. You could use a relatively small $m$ because you don't need many bits. You would like $m$ to be prime, but if it has some large factors that is probably not so bad for this use. $a$ should be near $\sqrt m$ and coprime to it. You can seed it with $X_0$ being your birthday or some such.

2 of 3
1

Square roots

One solution would be to use the digits of the square root of a number, such that the square root is not an integer (perfect square).

In that case, the square root should be an irrational number, which is acyclic by definition.

Analyzing this option for the numbers below 100 (with digits for the integer part of the square root plus 100 digits after the dot), I found that the balance between the generated digits is not always fair.

For the actual generated series, the average of the standard deviation was 3.034, with a maximum of 15.044 and a maximum difference between min occurrences and max occurrences of 15 (avg 9.433).

That is, counting the occurrence of each digit on a square root (limited to 100 after the dot) and calculating the standard deviation, then doing that for all non-perfect squares below 100 and taking the average of these results, the result is 3.034.

For the series mod 5 (that is, each element mod 5, for the situations where there are 5 options to choose from), the average standard deviation was 4.139 with a maximum of 7.778 and max diff of 21 (avg 10.178).

For the series mod 2 (true/false), average standard deviation of 5.971, max of 21.213, max diff of 30 (specifically for mod 2 of the digits in the square root of 41, 0 appears 65 times, 1 appears only 35 times), average of 8.444.

I'm not accepting this as the answer for my own question because:

  • The analysis above shows the distribution can be quite unbalanced
  • Calculating the square root by hand is somewhat expensive; a simpler algorithm would be welcome
  • I'm just generally looking for other options