A congruence of squares says that two integers have the same square modulo a positive integer . Factoring their difference of squares gives
A useful integer factorization results when or is a proper divisor of . Divisibility of a product does not generally force divisibility of either factor by all of : different prime factors of can divide different parts of that product.
For , . Therefore
Thus . The prime seven divides the difference, while eleven divides the sum. These computations already give a complete prime factorization because seven and eleven are prime numbers.
The Chinese remainder theorem explains the hidden sign choices. The four congruence classes solving have representatives . Modulo seven each is or ; modulo eleven each is or . Two independent sign choices produce four roots. The inputs thirteen and twenty agree modulo seven and disagree by sign modulo eleven, allowing their sum and difference to separate the two prime factors.
Figure 1. . Each cell gives the unique residue modulo with its indicated residues modulo seven and eleven. Relative to input thirteen, input twenty agrees modulo seven and has the opposite sign modulo eleven. The resulting greatest common divisors are seven and eleven. Diagonal all-same or all-opposite choices give only the trivial factors one and . Details.
For distinct odd prime numbers , and , a solution with and modulo yields both proper factors by the two greatest common divisors. For a general composite integer, a proper divisor need not itself be prime; further factoring can remain. If or in the coprime case, the two calculations return and one instead. A factor base helps generate relations, but does not ensure every resulting relation is useful.
For historical context, Pomerance describes Kraitchik's 1920s enhancement of the difference-of-squares approach associated with Fermat: seek a difference that is a multiple of , rather than exactly . His account also notes antecedents in Gauss and Seelhoff, so this is not an attribution of the whole idea to a single inventor. [ref].

Articles by others on the same topic (NaN)

Congruence of squares is a concept in number theory that deals with whether two numbers can be expressed as squares mod some integer. Specifically, it investigates under what conditions a quadratic residue (a number that is congruent to a perfect square modulo \( n \)) can be expressed as the square of another number modulo \( n \).