| 1 to 6 · step 1 | 6 | 3 : 3 (= 1 : 1) | Common testing set (six-sided die) · 3 primes, 50.0% prime density. |
| 1 to 10 · step 1 | 10 | 5 : 5 (= 1 : 1) | Common testing set (first ten integers) · 4 primes, 40.0% prime density. |
| 1 to 12 · step 1 | 12 | 6 : 6 (= 1 : 1) | Common testing set (d12 or months of the year) · 5 primes, 41.7% prime density. |
| 1 to 20 · step 1 | 20 | 10 : 10 (= 1 : 1) | Common testing set (d20 or small classroom sample) · 8 primes, 40.0% prime density. |
| 1 to 25 · step 1 | 25 | 12 : 13 | Common testing set (small sample size) · 9 primes, 36.0% prime density. |
| 1 to 31 · step 1 | 31 | 15 : 16 | Common testing set (days of a month) · 11 primes, 35.5% prime density. |
| 1 to 49 · step 1 | 49 | 24 : 25 | Common testing set (6/49 lottery balls) · 15 primes, 30.6% prime density. |
| 1 to 50 · step 1 | 50 | 25 : 25 (= 1 : 1) | Common testing set (common sampling range) · 15 primes, 30.0% prime density. |
| 1 to 52 · step 1 | 52 | 26 : 26 (= 1 : 1) | Common testing set (playing cards) · 15 primes, 28.8% prime density. |
| 1 to 60 · step 1 | 60 | 30 : 30 (= 1 : 1) | Common testing set (minutes or seconds) · 17 primes, 28.3% prime density. |
| 1 to 100 · step 1 | 100 | 50 : 50 (= 1 : 1) | Common testing set (percent scale and the most common test range) · 25 primes, 25.0% prime density. |
| 1 to 365 · step 1 | 365 | 182 : 183 | Common testing set (days of the year) · 72 primes, 19.7% prime density. |
| 1 to 500 · step 1 | 500 | 250 : 250 (= 1 : 1) | Common testing set (mid-size QA range) · 95 primes, 19.0% prime density. |
| 1 to 1,000 · step 1 | 1,000 | 500 : 500 (= 1 : 1) | Common testing set (large sample) · 168 primes, 16.8% prime density. |
| 0 to 9 · step 1 | 10 | 5 : 5 (= 1 : 1) | Common testing set (decimal digits) · 4 primes, 40.0% prime density. |
| 0 to 10 · step 1 | 11 | 6 : 5 | Common testing set (inclusive zero-to-ten scale) · 4 primes, 36.4% prime density. |
| 0 to 99 · step 1 | 100 | 50 : 50 (= 1 : 1) | Common testing set (two-digit numbers) · 25 primes, 25.0% prime density. |
| 0 to 100 · step 1 | 101 | 51 : 50 | Common testing set (percentage scale) · 25 primes, 24.8% prime density. |
| 0 to 255 · step 1 | 256 | 128 : 128 (= 1 : 1) | Common testing set (8-bit byte values) · 54 primes, 21.1% prime density. |
| 0 to 1,023 · step 1 | 1,024 | 512 : 512 (= 1 : 1) | Common testing set (10-bit values) · 172 primes, 16.8% prime density. |
| −10 to +10 · step 1 | 21 | 11 : 10 | Common testing set (symmetric small range) · 4 primes, 19.0% prime density. Primes counted for positive values only. |
| −50 to +50 · step 1 | 101 | 51 : 50 | Common testing set (symmetric mid range) · 15 primes, 14.9% prime density. Primes counted for positive values only. |
| −100 to +100 · step 1 | 201 | 101 : 100 | Common testing set (symmetric test range) · 25 primes, 12.4% prime density. Primes counted for positive values only. |
| −500 to +500 · step 1 | 1,001 | 501 : 500 | Common testing set (example range with negatives) · 95 primes, 9.5% prime density. Primes counted for positive values only. |
| 1 to 10,000 · step 1 | 10,000 | 5,000 : 5,000 (= 1 : 1) | Common testing set (large discrete range) · 1,229 primes, 12.3% prime density. |
| n ≡ 0 (mod 3) in 1 to 100 | 33 | 16 : 17 | Congruence class · modulo 3, residue 0 · zero residue (multiples of 3) · e.g. 3, 6, 9, 12… |
| n ≡ 1 (mod 3) in 1 to 100 | 34 | 17 : 17 (= 1 : 1) | Congruence class · modulo 3, residue 1 · quadratic residue · e.g. 1, 4, 7, 10… |
| n ≡ 2 (mod 3) in 1 to 100 | 33 | 17 : 16 | Congruence class · modulo 3, residue 2 · quadratic non-residue · e.g. 2, 5, 8, 11… |
| n ≡ 0 (mod 5) in 1 to 100 | 20 | 10 : 10 (= 1 : 1) | Congruence class · modulo 5, residue 0 · zero residue (multiples of 5) · e.g. 5, 10, 15, 20… |
| n ≡ 1 (mod 5) in 1 to 100 | 20 | 10 : 10 (= 1 : 1) | Congruence class · modulo 5, residue 1 · quadratic residue · e.g. 1, 6, 11, 16… |
| n ≡ 2 (mod 5) in 1 to 100 | 20 | 10 : 10 (= 1 : 1) | Congruence class · modulo 5, residue 2 · quadratic non-residue · e.g. 2, 7, 12, 17… |
| n ≡ 3 (mod 5) in 1 to 100 | 20 | 10 : 10 (= 1 : 1) | Congruence class · modulo 5, residue 3 · quadratic non-residue · e.g. 3, 8, 13, 18… |
| n ≡ 4 (mod 5) in 1 to 100 | 20 | 10 : 10 (= 1 : 1) | Congruence class · modulo 5, residue 4 · quadratic residue · e.g. 4, 9, 14, 19… |
| n ≡ 0 (mod 7) in 1 to 100 | 14 | 7 : 7 (= 1 : 1) | Congruence class · modulo 7, residue 0 · zero residue (multiples of 7) · e.g. 7, 14, 21, 28… |
| n ≡ 1 (mod 7) in 1 to 100 | 15 | 7 : 8 | Congruence class · modulo 7, residue 1 · quadratic residue · e.g. 1, 8, 15, 22… |
| n ≡ 2 (mod 7) in 1 to 100 | 15 | 8 : 7 | Congruence class · modulo 7, residue 2 · quadratic residue · e.g. 2, 9, 16, 23… |
| n ≡ 3 (mod 7) in 1 to 100 | 14 | 7 : 7 (= 1 : 1) | Congruence class · modulo 7, residue 3 · quadratic non-residue · e.g. 3, 10, 17, 24… |
| n ≡ 4 (mod 7) in 1 to 100 | 14 | 7 : 7 (= 1 : 1) | Congruence class · modulo 7, residue 4 · quadratic residue · e.g. 4, 11, 18, 25… |
| n ≡ 5 (mod 7) in 1 to 100 | 14 | 7 : 7 (= 1 : 1) | Congruence class · modulo 7, residue 5 · quadratic non-residue · e.g. 5, 12, 19, 26… |
| n ≡ 6 (mod 7) in 1 to 100 | 14 | 7 : 7 (= 1 : 1) | Congruence class · modulo 7, residue 6 · quadratic non-residue · e.g. 6, 13, 20, 27… |
| Multiples of 2 in 1 to 100 · step 2 | 50 | 50 : 0 | Multiples · divisible when the last digit is even · e.g. 2, 4, 6, 8… |
| Multiples of 3 in 1 to 100 · step 3 | 33 | 16 : 17 | Multiples · divisible when the digit sum is divisible by 3 · e.g. 3, 6, 9, 12… |
| Multiples of 4 in 1 to 100 · step 4 | 25 | 25 : 0 | Multiples · divisible when the last two digits form a multiple of 4 · e.g. 4, 8, 12, 16… |
| Multiples of 5 in 1 to 100 · step 5 | 20 | 10 : 10 (= 1 : 1) | Multiples · divisible when the last digit is 0 or 5 · e.g. 5, 10, 15, 20… |
| Multiples of 6 in 1 to 100 · step 6 | 16 | 16 : 0 | Multiples · divisible when the even and digit sum divisible by 3 · e.g. 6, 12, 18, 24… |
| Multiples of 8 in 1 to 100 · step 8 | 12 | 12 : 0 | Multiples · divisible when the last three digits form a multiple of 8 · e.g. 8, 16, 24, 32… |
| Multiples of 10 in 1 to 100 · step 10 | 10 | 10 : 0 | Multiples · divisible when the last digit is 0 · e.g. 10, 20, 30, 40… |
| Multiples of 12 in 1 to 100 · step 12 | 8 | 8 : 0 | Multiples · divisible when the divisible by both 3 and 4 · e.g. 12, 24, 36, 48… |
| Multiples of 25 in 1 to 100 · step 25 | 4 | 2 : 2 (= 1 : 1) | Multiples · divisible when the last two digits are 00, 25, 50 or 75 · e.g. 25, 50, 75, 100… |
| Multiples of 50 in 1 to 100 · step 50 | 2 | 2 : 0 | Multiples · divisible when the last two digits are 00 or 50 · e.g. 50, 100… |
| X(n+1) = (a · X(n) + c) mod m | m states (outputs 0 to m − 1) | Depends on a, c and m | PRNG · Linear congruential generator (LCG) · the general recurrence; the seed is X(0) |
| Hull–Dobell theorem (full period) | Period m when all three conditions hold | 1 : 1 over a full period when m is even | PRNG · Full-period rule: c coprime to m; a − 1 divisible by every prime factor of m; a − 1 divisible by 4 if 4 divides m |
| Numerical Recipes: a = 1,664,525, c = 1,013,904,223, m = 2^32 | 4,294,967,296 states (full period) | 2,147,483,648 : 2,147,483,648 (= 1 : 1); lowest bit alternates | PRNG · LCG · widely copied 32-bit generator; weak low-order bits |
| ANSI C example: a = 1,103,515,245, c = 12,345, m = 2^31 | 2,147,483,648 states (full period) | 1,073,741,824 : 1,073,741,824 (= 1 : 1); lowest bit alternates | PRNG · LCG · sample rand() from the C standard; use only the high bits |
| Java java.util.Random: a = 25,214,903,917, c = 11, m = 2^48 | 281,474,976,710,656 states | 1 : 1 over the full period; lowest bit alternates | PRNG · LCG · 48-bit state; nextInt() returns the top 32 bits |
| MINSTD (Park–Miller): a = 16,807, c = 0, m = 2^31 − 1 | 2,147,483,646 states (1 to m − 1; 0 is never produced) | 1,073,741,823 : 1,073,741,823 (= 1 : 1) | PRNG · Multiplicative LCG · prime modulus 2,147,483,647 (a Mersenne prime); 48,271 is the improved multiplier |
| Knuth MMIX: a = 6,364,136,223,846,793,005, c = 1,442,695,040,888,963,407, m = 2^64 | 18,446,744,073,709,551,616 states (full period) | 2^63 : 2^63 (= 1 : 1); lowest bit alternates | PRNG · LCG · 64-bit state, usually a 32-bit output from the high bits |
| RANDU (IBM): a = 65,539, c = 0, m = 2^31 | Period only 2^29 = 536,870,912 for odd seeds | 0 : all odd (odd seed gives only odd outputs) | PRNG · Flawed LCG · consecutive triples lie on only 15 planes |
| Low-order bit weakness (m = 2^k) | The lowest j bits repeat with period 2^j | Lowest bit alternates even, odd, even, odd | PRNG · Limitation · parity and small moduli (x mod 2, x mod 4) are highly predictable |
| LCG limitations overall | Output fully determined by the seed | Ratio looks fair, order does not | PRNG · Limitation · not cryptographically secure, points fall on lattice planes, and mod n mapping adds bias; this tool uses crypto.getRandomValues() instead |
| Signed 8-bit (int8): −128 to 127 | 256 | 128 : 128 (= 1 : 1) | Integer overflow boundary · 127 + 1 wraps to −128 · C int8_t, Java byte |
| Unsigned 8-bit (uint8): 0 to 255 | 256 | 128 : 128 (= 1 : 1) | Integer overflow boundary · 255 + 1 wraps to 0 · bytes, RGB channels |
| Signed 16-bit (int16): −32,768 to 32,767 | 65,536 | 32,768 : 32,768 (= 1 : 1) | Integer overflow boundary · 32,767 + 1 wraps to −32,768 · Java short |
| Unsigned 16-bit (uint16): 0 to 65,535 | 65,536 | 32,768 : 32,768 (= 1 : 1) | Integer overflow boundary · ports, Unicode BMP code units |
| Signed 32-bit (int32): −2,147,483,648 to 2,147,483,647 | 4,294,967,296 | 2,147,483,648 : 2,147,483,648 (= 1 : 1) | Integer overflow boundary · 2,147,483,647 + 1 wraps to −2,147,483,648 · C int, Java int, JavaScript bitwise operators |
| Unsigned 32-bit (uint32): 0 to 4,294,967,295 | 4,294,967,296 | 2,147,483,648 : 2,147,483,648 (= 1 : 1) | Integer overflow boundary · IPv4 addresses, crypto.getRandomValues() Uint32Array |
| JavaScript safe integers (Number): −9,007,199,254,740,991 to 9,007,199,254,740,991 | 18,014,398,509,481,983 | 9,007,199,254,740,991 : 9,007,199,254,740,992 | Integer overflow boundary · Number.MAX_SAFE_INTEGER = 9,007,199,254,740,991 · above it, integers lose exactness |
| Signed 64-bit (int64): −9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 | 18,446,744,073,709,551,616 | 9,223,372,036,854,775,808 : 9,223,372,036,854,775,808 (= 1 : 1) | Integer overflow boundary · 9,223,372,036,854,775,807 is the maximum · BigInt.asIntN(64, x) |
| Unsigned 64-bit (uint64): 0 to 18,446,744,073,709,551,615 | 18,446,744,073,709,551,616 | 9,223,372,036,854,775,808 : 9,223,372,036,854,775,808 (= 1 : 1) | Integer overflow boundary · BigInt.asUintN(64, x) · BigInt itself has no fixed upper limit |
| This tool's allowed range: −1,000,000,000,000,000 to 1,000,000,000,000,000 | 2,000,000,000,000,001 | 1,000,000,000,000,001 : 1,000,000,000,000,000 | Engine limit · minimum and maximum between −1,000,000,000,000,000 and 1,000,000,000,000,000 so every integer stays exact |