EditSafely

Generate Random Relative Prime Numbers

Generate a list of random relative primes.

Runs on your device, nothing uploaded

Presets:
How many pairs
Minimum value
Maximum value
Brackets
Every pair differs, and the two numbers in a pair differ too.
Separator

Output

Generating…

This runs entirely on your device

Generate Random Relative Prime Numbers is JavaScript that your browser has already downloaded, and it does the whole job on your own machine. Nothing is requested from a server, so the result you see has never existed anywhere but here.

  • No server involved
  • Generated on your device
  • Works offline once loaded
  • Nothing stored or logged

How to use Generate Random Relative Prime Numbers

  1. 1. Set the range. Enter Minimum value and Maximum value to bound the numbers each pair is drawn from. The generator confirms the pair shares no common factor before returning it.
  2. 2. Set the quantity and formatting. Enter How many pairs to control batch size, pick a Brackets chip for (a, b), [a, b] or a, b, tick No repeated pairs for a list with no duplicates, and set Separator for how pairs are joined.
  3. 3. Copy the coprime pairs. Copy the generated pairs of relatively prime numbers and paste them into a number theory worksheet, a test dataset, or a cryptography example.

When to use Generate Random Relative Prime Numbers

Generate Random Relative Prime Numbers produces pairs of coprime integers, meaning their greatest common divisor is 1, within a range you choose. Use it whenever you need sample coprime pairs for math problems or algorithm testing.

  • Building a number theory worksheet. A teacher wants example pairs for a lesson on the Euclidean algorithm and coprimality, and generating several pairs saves manually checking gcd values by hand.
  • Testing a GCD or Euclidean algorithm implementation. You wrote a greatest common divisor function and want confirmed coprime pairs, where the expected gcd is always 1, to check the function returns the correct result.
  • Demonstrating RSA key generation concepts. You are teaching the basics of RSA cryptography, where choosing coprime numbers matters for the public exponent, and want live examples to illustrate the concept simply.
  • Generating sample fractions in lowest terms. Since coprime numerator and denominator pairs cannot be simplified further, generating them gives you quick examples of fractions already in lowest terms for a math example.

Examples

Three coprime pairs from 1 to 100

One possible result

(69, 71)
(85, 16)
(12, 31)

About the Generate Random Relative Prime Numbers tool

Generate Random Relative Prime Numbers is a free online tool that works entirely inside your web browser. Generate a list of random relative primes. Because the processing happens on your own device, nothing you enter is uploaded, logged or stored anywhere.

This page is one of 120 Random utilities on EditSafely. Each one does a single job well, and all of them follow the same rule: your input stays on your machine.

You can shape the output with 6 settings, including How many pairs, Minimum value, Maximum value and Brackets, and the result refreshes the moment you change one. A worked example further down the page shows exactly what the tool produces for a real input.

Because nothing leaves your device, the tool is suitable for sensitive content such as internal documents, credentials or customer data. It also responds instantly, since every step is handled on your own machine rather than by a remote API.

Frequently asked questions

Does Generate Random Relative Prime Numbers cost anything?

Yes, it is completely free. All 2,943 tools on EditSafely work without an account, a subscription or usage limits.

Does the generator send anything to a server?

No data leaves your device. The whole tool is JavaScript that runs inside your browser tab, so there is no upload, no server-side processing and no log of what you did. If you disconnect from the internet after the page loads, it keeps working.

How do I get a different result?

Press the button under the result to generate again. Each run is computed fresh on your device, and any options you change are applied to the next result immediately.

Do I need to sign up or install anything?

Nothing to install and no account needed. Open the page in any up-to-date browser, including on a phone or tablet, and the tool is ready.

How do I use the result?

The output panel has a one-click Copy button, and Download saves the result as a file.