Nirmion
Помощь Найдите инструмент

NUMBER THEORY / CYCLIC GENERATOR

Primitive Root Modulo Prime Calculator

Find the least positive generator of the nonzero residue group modulo a prime. Review the bounded integer domain, method trace, and verification evidence with the result.

  • 01 Calculated in this tab
  • 02 Values stay in this browser tab
  • 03 Use boundary

Conversion input

Known value

Filter by unit name, symbol, or code. Your current selections remain available.

Preparing the calculator...

METHOD / WORKED EXAMPLE

Audit the Primitive Root Modulo Prime result step by step

Find the least positive generator of the nonzero residue group modulo a prime. The result panel preserves the defining recurrence, residue, or counting identity so the output can be checked without trusting an unexplained number.

WORKED DEFAULT

Check the calculation with the default inputs

For p = 17, candidate 3 passes the factor tests and has order 16, so the least primitive root is 3.

  1. Factor group order16 = 2^4
  2. Test candidate3^(16/2) is not 1 modulo 17
  3. Confirm orderord_17(3) = 16

READ THE RESULT

Interpret the output in context

The result is the smallest positive generator found; other primitive roots can generate the same nonzero residue group.

ASSUMPTIONS AND LIMITS

Know where the model stops

  • The supplied modulus is prime.
  • Candidate order is certified from every distinct prime factor of p minus one.

The prime cap keeps factorization and candidate search predictable; the result is not approval of a cryptographic group.

COMMON QUESTIONS

Primitive Root Modulo Prime Calculator FAQs

What definition does Primitive Root Modulo Prime Calculator use?

Factor p minus one into distinct primes and test candidates until every reduced-order power differs from one modulo p. Prime residue groups are cyclic, while arbitrary composite moduli need different existence checks. Inputs remain whole numbers inside the displayed domain, and the page never rounds a decimal into an accepted integer. This keeps the reported result tied to one explicit mathematical definition rather than an unstated convention.

How can I verify the Primitive Root Modulo Prime output?

The result is the smallest positive generator found; other primitive roots can generate the same nonzero residue group. Use the factor tests shown, then confirm the power at p minus one returns to one. Reuse the displayed recurrence, congruence, or counting identity with the same inputs. The verification evidence checks this calculator's result, but it does not establish assumptions or conclusions outside the stated mathematical domain.

Why is the Primitive Root Modulo Prime input bounded?

The prime cap keeps factorization and candidate search predictable; the result is not approval of a cryptographic group. Larger moduli require more capable factorization and deliberate security review. A finite limit prevents browser stalls and avoids presenting an unsafe floating-point integer as exact. Work beyond that limit belongs in arbitrary-precision software with explicit resource controls and independent validation.

Use boundary

Calculation path

Factor p minus one into distinct primes and test candidates until every reduced-order power differs from one modulo p.

Calculation path

For each prime q dividing p-1, require g^((p-1)/q) not congruent to 1.