The Lagrange root bound over a field says that a nonzero polynomial of degree over a field has at most roots. In particular, a polynomial modular congruence of degree modulo a prime number has at most incongruent solutions unless all its coefficients vanish modulo that prime.
Suppose that is good and that the positive integer divisor divides . The roots of form a finite multiplicative subgroup of . By the fact that every finite multiplicative subgroup of a field is cyclic, is a cyclic group of order . The solutions in of areso there are at least of them. The Lagrange root bound over a field gives at most roots in all of , hence exactly . Thus every divisor of a good number is good.
Now put . By the Chinese remainder theorem for unit groups, a base is a Fermat-pseudoprime base precisely when its two components satisfyThe power roots in a finite field andshow that each component has ten choices. Therefore there areFermat-pseudoprime bases.
To impose the strong pseudoprime condition, write with odd. Since , we have . In each cyclic group of ten Fermat components, raising to the th power sends five elements to and five elements to . A pair of components passes the strong test exactly when their signs agree: the pair satisfies the first alternative, and satisfies the second at . Components of opposite sign become after squaring and can never jointly equal . Hence the number of strong-pseudoprime bases is
Solved by gpt-5.6-sol high.
Codex Wiki