After continued-fraction recovery in quantum order finding, an even candidate denominator can be used to try the displayed greatest common divisors. Return only a divisor strictly between one and . If is the true even multiplicative order with a nontrivial halfway power, success follows from factor extraction from an even modular order. A candidate that is not a period can occasionally still yield a factor; testing before the gcds therefore changes single-run success probabilities. The output-factor check guarantees correctness in either convention.
Fermat number 2026-10-07
A Fermat number is for . Distinct Fermat numbers are coprime integers. Their prime divisors are constrained by the multiplicative order of modulo that prime; this remains useful whether or not the Fermat number itself is prime. The initial value must be distinguished when a statement restricts to positive indices.
A group presentation with a cyclic list of generators and relations has no nontrivial finite quotient of a group. In a finite image, all generator orders are odd. Choose the least prime dividing any nontrivial generator order and let be the predecessor of a generator whose order is divisible by . Conjugation by acts as squaring on , so the multiplicative order of modulo divides the order of . That multiplicative order is greater than one and divides , giving a prime divisor smaller than in the order of , a contradiction. This argument applies to any cycle length; it asserts absence of finite quotients, not infinitude of the presented group.
Fermat's little theorem says that for a prime and , ; equivalently for every integer . The Wilson theorem says for a prime (and, conversely, this congruence characterizes primes among integers greater than one).
For , is a square root of minus one modulo a prime. If is odd and , Fermat's little theorem gives
so is even and . Conversely, put . Pairing with in the factorial gives . For , is even, so the Wilson theorem yields . Thus
and in the latter case supplies a solution.
For the multiplicative order assertion, divide by : , . Since and , it follows that . Minimality of the positive order excludes , hence and
In particular by Fermat's little theorem. Negative , if included, are handled by the same division using the modular inverse of .
A Fermat number in the paper has . If a prime divides , it is odd and . Squaring gives , so the order divides . It does not divide , since modulo an odd prime. Every divisor of is a power of two, so the only possibility is
If two different Fermat numbers shared a prime factor, the same element modulo that prime would have two different orders. This is impossible, proving pairwise coprimality. Also , so for every such prime is modulo . No prime modulo can occur.
A prime modulo need not occur: take . It is prime, , and . Since the order divides , the first congruence excludes every divisor of and the second excludes ; hence the order is . This is not a power of two, so is not a prime divisor of a Fermat number. The index restriction matters: the conventional extra number is outside the paper's positive- family.
The PDF's small superscript is essential: . Interpret as the least positive period, the multiplicative order of modulo . If one permitted an unspecified nonminimal period, the answer would not be identifiable; for example, gives the same constant function with period one or period eight. Under the promised periodic modular-exponential interpretation, , so is a unit. Thus
In particular, different residue classes modulo have different function values, which is necessary for the usual quantum period finding coset argument.
Prepare by applying the quantum Fourier transform to the first register. Use repeated squaring to precompute , then multiply the value register by that known number controlled on bit of . These controlled modular multiplications are reversible because is a unit; their inverses use the modular inverses of the same constants. This produces with a polynomial number of the assumed arithmetic operations. Known work registers can be uncomputed.
Measure the value register. Since , its fiber is exactly one coset, and the first register becomes
The quantum Fourier transform of a periodic coset state is supported uniformly on the outcomes , . Indeed the inner geometric series is zero unless , and each allowed amplitude has modulus .
Take two independent Fourier samples and return
This is two-sample exact period recovery. The Chinese remainder theorem makes divisibility of independent uniform residues independent across the different prime divisors of . For each such prime , both and are divisible by with probability . Therefore
The number-theoretic facts used here are the Chinese remainder theorem, the Euler product for the Riemann zeta function at two, and . The candidate can also be certified by : it divides the least period, so this equality holds exactly when it is the full period. Each preparation, reversible evaluation, QFT, measurement and greatest common divisor calculation has the assumed or standard polynomial time cost in . Two runs suffice for the desired constant success probability. Quantum period finding recovers the least period with probability at least in polynomial time.
Let . The group action by left multiplication on gives a group homomorphism . Its kernel is the normal core of a subgroup,
The containment follows by looking at the stabilizer of the coset , and finite index follows from the finite image in .
The Higman group is
It is visibly a finitely presented group. To prove infinitude, first form
It is the amalgamated free product of and , identifying their infinite cyclic subgroups generated by . Each factor is an HNN extension of an infinite cyclic group, so its base and stable letter both have infinite order. No nonzero power of belongs to in the first factor, by the map to sending to one and to zero. In the second factor, no nonzero power of belongs to : the stable-letter map forces a hypothetical equality to have , and the base has infinite order. The normal form theorem for an amalgamated free product therefore shows that is a rank-two free group.
Similarly,
contains as a rank-two free group. Identifying these two free subgroups yields
The normal form theorem for an amalgamated free product embeds in . In particular, contains a free group of rank two and is infinite.
The finite quotients of cyclic squaring presentations argument now rules out every nontrivial finite quotient of . In a finite image, a relation forces the order of to be odd, since conjugate elements have the same order. If any generator has nontrivial image, let be the least prime number dividing the order of any of the four generator images, and choose whose order is divisible by . Its predecessor conjugates it to its square. If is the order of , iterating conjugation gives . Hence the multiplicative order of modulo divides . It is greater than one and divides , so it has a prime factor smaller than , which also divides . This contradicts the minimal choice of . Thus all four generator images are trivial. has no nontrivial finite quotient, and the normal-core argument above implies that has no proper finite-index subgroup.
For the final argument, Conjugation preserves the order of an element. Thus if one nonidentity element has finite order , every nonidentity element has that same order, and . Moreover is prime: if a prime factor properly divides , then is nonidentity but has the smaller order .
When , the element is nonidentity, so choose with . The conjugator is not the identity, since , and therefore . Induction gives , and at this yields
But Fermat's little theorem, with the odd prime , gives , contradicting that divisibility.
For , is not in the nonidentity conjugacy class, so the required conjugator cannot be chosen. Instead, a group in which every element has square one is an abelian group: also equals . In an abelian group every conjugacy class is a singleton, so one nonidentity class permits only one nonidentity element, giving a group of order two. This contradicts infinitude. Consequently the infinite group in question is a .
Write with odd. If , the polynomial factor of by , evaluated at , supplies a proper divisor. Therefore must be a power of two. Conversely this is only a necessary condition for primality testing.
For a prime factor of the number, is odd and does not divide . Its multiplicative order satisfies but , since . When is a power of two, every proper divisor of divides , so . By Lagrange theorem in the multiplicative group of a finite field, . Thus .
The Fermat factorization method searches for a difference of two squares: starting at , increase until , and return . Every factorization of an odd integer has this form, with and . For , the successive differences at are . The last is , giving . Trial division by the primes up to their respective square roots confirms that both factors are prime.