Wieferich Pair Checker
MutualWieferichprimes modulara^(b−1)≡1modb²andb^(a−1)≡1moda², exactBigIntnot floating powers. Explicit bounded resource/branch and actual observations or independently verified parameters; no unproved infinite assertion certified.
Description
A mutual Wieferich pair requires two distinct primes satisfying both directions of a modular-power condition.
A mutual Wieferich pair requires two distinct primes satisfying both directions of a modular-power condition.1
This tool checks those finite congruences with exact integer arithmetic rather than using floating-point powers.
When to use Wieferich Pair Checker
This tool checks those finite congruences with exact integer arithmetic rather than using floating-point powers.
How to use Wieferich Pair Checker and how it works
- Prepare first prime, second prime, using the input definitions and matching units below.
- Enter the required fields and run Wieferich Pair Checker.
- Read result.firstBaseWieferichAtSecond, result.secondBaseWieferichAtFirst, result.isMutualWieferichPair using the units, signs and ordering explained below.
- Correct any rejected inputs and rerun; interpret the result within the stated model and its assumptions.
| Input field | Meaning | Value type | Requirement |
|---|---|---|---|
| actualFirstPrime | Actual First Prime. Use the units and matching context stated in the calculation below. | number | Required; integer 2–1000000; finite; other constraints below |
| actualSecondPrime | Actual Second Prime. Use the units and matching context stated in the calculation below. | number | Required; integer 2–1000000; finite; other constraints below |
Require distinct prime integers p,q from 2 to 1000000. Check primality, then use BigInt repeated-squaring modular exponentiation for p^(q-1) modulo q^2 and q^(p-1) modulo p^2. Return each equality-to-one flag and their conjunction. This finite modular test uses exact integer arithmetic and does not address an infinite existence assertion.
first=(p^(q-1) mod q^2)==1; second=(q^(p-1) mod p^2)==1; mutual=first && second Apply the input ordering, units and branch conditions stated above.
| Output field | Meaning | Value type |
|---|---|---|
| result | Object containing the calculated or selected fields below. | object |
| result.firstBaseWieferichAtSecond | Whether p^(q-1) equals one modulo q squared. | boolean |
| result.secondBaseWieferichAtFirst | Whether q^(p-1) equals one modulo p squared. | boolean |
| result.isMutualWieferichPair | True only when both exact modular conditions hold. | boolean |
{
"input": {
"actualFirstPrime": 2,
"actualSecondPrime": 1093
},
"output": {
"result": {
"firstBaseWieferichAtSecond": true,
"secondBaseWieferichAtFirst": true,
"isMutualWieferichPair": true
}
}
} Limitations and assumptions
The calculation uses the supplied observations and model inputs. It does not collect measurements, select a reference population or coefficient, or establish that the model applies to the actual case. The stated branch conditions and output units remain part of the result.
All fields require explicit values. Unexpected fields, wrong types, nonfinite numbers and sparse arrays are rejected. Alignment, bounds and supported-token rules are explained above; extremely large inputs or nonfinite results can also fail. Input errors differ from successful false comparisons, unavailable-domain flags and empty match lists.
Alternative or Complementary methods
Use Prime Gap Calculator for a complementary operation: A consecutive-prime gap requires that no prime lie between the two endpoints.
Use Twin Prime Conjecture Checker for a complementary operation: A finite list of twin-prime pairs cannot settle an assertion about infinitely many pairs.
References
-
Wieferich Pair Checker — tool.io
Similar or alternative tools
- Prime Gap Calculator
A consecutive-prime gap requires that no prime lie between the two endpoints.
- Twin Prime Conjecture Checker
A finite list of twin-prime pairs cannot settle an assertion about infinitely many pairs.