Idempotent Factorizations of Square-free Integers

We explore the class of positive integers n that admit idempotent factorizations n = p̄q̄ such that λ(n) ∣ (p̄ − 1)(q̄ − 1), where λ is the Carmichael lambda function. Idempotent factorizations with p̄ and q̄ prime have received the most attention due to their cryptographic advantages, but there are an infinite number of n with idempotent factorizations containing composite p̄ and/or q̄. Idempotent factorizations are exactly those p̄ and q̄ that generate correctly functioning keys in the RSA 2-prime protocol with n as the modulus. While the resulting p̄ and q̄ have no cryptographic utility and therefore should never be employed in that capacity, idempotent factorizations warrant study in their own right as they live at the intersection of multiple hard problems in computer science and number theory. We present some analytical results here. We also demonstrate the existence of maximally idempotent integers, those n for which all bipartite factorizations are idempotent. We show how to construct them, and present preliminary results on their distribution.


Introduction
Certain square-free positive integers n can be factored into two numbers ( p, q) such that λ(n) | ( p − 1)( q − 1), where λ is the Carmichael lambda function.We call such ( p, q) an idempotent factorization of n, and (n, p, q) an idempotent tuple.We say that n = p q admits an idempotent factorization.(Overbars indicate that p, q are not necessarily prime.) When n is prime, all factorizations are trivially idempotent (p = 1 or q = 1).For p and q prime, the factorization n = p q is idempotent due to Euler's Theorem and the exponent cycle length property of λ.If p and q are sufficiently large, such factorizations have useful cryptographic properties, and are the basis for the 2-prime Rivest-Shamir-Adleman (RSA) cryptosystem [1].Carmichael numbers [2] also easily form idempotent products.
These, however, are not the only idempotent factorizations.While they do not use the term themselves, Huthnance and Warndof [3] describe idempotent factorizations n = p q, where p and q are either primes or Carmichael numbers, noting that such integers generate correct RSA keys.These values are in fact a subset of idempotent factorizations as we define them here, as there are an infinite number of idempotent tuples (n, p, q) with composite p and/or q where neither p nor q are Carmichael numbers.We emphasize that, like the subset of idempotent tuples noted in [3], these numbers should never be used cryptographically [4].We merely note that idempotent factorizations are exactly those p, q that "fool" RSA in the sense that such n, p, q supplied to the 2-prime RSA protocol will generate keys that encrypt and decrypt messages correctly.
An idempotent factorization of the form n = pq or n = p q with one composite and one prime is a semi-composite idempotent factorization.A factorization of the form n = p q with both components composite is a fully composite idempotent factorization (implying n has at least four factors).Trivial factorizations ( p or q = 1) and factorizations of n where n is a semiprime ( p and q prime) will not be considered further.

Carmichael numbers C have the property
For a factorization of a Carmichael number to be idempotent, we have

Maximally Idempotent Integers
If all bipartite factorizations of n are idempotent, we say that n is maximally idempotent.
Suppose that p = p 1 p 2 , q = p 3 is an idempotent factorization.We have Similarly, for the other two factorizations, we have ab + bc ≡ This gives the following theorem: Since the equations for maximal idempotency are all sums of products of two or more a i with no duplicates, and that these sums are all ≡ λ 0, we have the following result: As shown previously, a Carmichael number C is maximally idempotent

Strong Impostors and Idempotent Factorizations
We have shown [5] that square-free composite numbers s with the property λ(s)|2(s − 1) produce semi-composite idempotent tuples (n, s, r) when paired with any prime r coprime to s.We called these s strong impostors because they behave as prime numbers to the 2-prime RSA protocol.Strong impostors include the Carmichael numbers, which have been long known to have this property, but are not limited to them.It can easily be shown that the product of any two odd coprime strong impostors s 1 , s 2 is idempotent.

Examples
The first 16 square-free n with m ≥ 3 factors that admit idempotent factorizations are shown in Table 1.6 and 15 are strong impostors, but 10, 14, and 21 are not.In addition, 210 = 2 × 3 × 5 × 7 is the smallest square-free n that can be factored into two composite factors.It can be so factored in three ways, of which (10, 21) is fully composite and idempotent.
The first 16 maximally idempotent n with three and four prime factors are shown in Table 2, along with the two 5-factor cases < 2 30 .Carmichael numbers are underlined.
Maximally idempotent integers are rare.Below 2 30 there are 15189 with three prime factors, 315 with 4, and 2 with 5.

Cumulative Statistics for Idempotent Factorizations of the Carmichael Numbers
An analysis of maximally idempotent Carmichael numbers < 10 18 is shown in Table 3 [6].

383.0
As expected, maximally idempotent integers are found at higher proportions in the Carmichael numbers, although they remain rare.There is only one 5-factor maximally idempotent Carmichael number in the results above: C598349 = 661 × 991 × 3301 × 4951 × 9901.It is the smallest such Carmichael number.

Constructing Maximally Idempotent Integers
Knowing sufficient conditions for the existence of idempotent factorizations and maximal idempotency suggests constructive approaches.We may construct a set of maximally idempotent integers sharing a given λ in the following way: (1) Pick some prime p, let λ = p − 1.
(2) Find all the divisors of λ a i such that p i = a i + 1 is prime.(3) Construct the divisor graph of λ by creating a node for each a i , with an edge from each a i to every node a j such that λ/a i | a j .Any two such nodes will have the property a i a j ≡ λ 0. Thus, by Theorem 2, every k-clique with k ≥ 3 in the resulting graph corresponds to a maximally idempotent integer with k prime factors.Each node a i corresponds to a prime factor p i = a i + 1, with a maximally idempotent n equal to the product of all corresponding p i in the subgraph.It follows that all divisors of such constructed integers with more than two factors are also maximally idempotent.
For example, consider p = 37, λ = 36.The resulting divisors a i with p i = a i + 1 prime are 1, 2, 4, 12, 18, 36.This produces the divisor graph of Figure 1.This graph contains six 3-cliques and one 4-clique.These correspond to seven maximally idempotent integers with λ = 36.Five of the six 3-cliques correspond to integers in Table 2.The 4-clique is the smallest maximally idempotent integer with four factors, also shown in Table 2.
To construct a maximally idempotent integer with a large number of factors, choose p such that λ = p − 1 is highly composite.The divisor graph will then have a large number of nodes, high connectivity and a greater likelihood of k-cliques for larger k.

Cumulative Statistics on Idempotent Factorizations
Cumulative statistics for idempotent factorizations for n < 2 30 are shown below (Tables 5-7).
R s f indicates the ratio of numbers with idempotent factorizations to the total number of candidates n, those square-free numbers with > 2 factors.R N indicates the ratio to all n in the indicated interval.The first entry in R cpu is the computation time in seconds on the author's computer for the indicated interval.Remaining entries are the ratio of computation time of the current interval to the previous interval.An entry of the form i:j in row with #factors = F indicates that there are j integers < 2 30 with F prime factors and i idempotent factorizations.All answers are rounded to the indicated number of decimals.We ignore order when counting factorizations.

Idempotent Tuples and RSA
Unlike factorizations of n with p and q prime, idempotent factorizations of n with composite p and/or q offer no cryptographic utility.Like the Carmichael numbers, they should never be used in practice [4].Nonetheless, all idempotent factorizations of n produce correct results if used in the 2-prime RSA protocol.Given n = p q, choosing any integers (e, d) with ed ≡ 1 yields public and private keys that work correctly.This arises from the definition of idempotency.
Theorem 3. A factorization of square-free n into ( p, q) with n = p q and ( p, q) > 1 produces correctly functioning keys for 2-prime RSA iff the factorization is idempotent.
We must show r = 0.By the exponent cycle length property of λ, we have is the smallest positive integer for which this is possible, so r = 0. (←): By hypothesis, let n be a square-free positive integer, n = p q, ( p − 1)( q − 1) = mλ(n) for some positive integer l.Let (e, d) be positive integers such that ed − 1 ≡ ( p−1)( q−1) 0. We have by the exponent cycle length property of λ.

Conclusions and Future Work
We conjecture that, for any square-free p, a composite non-Carmichael q can be found such that n = p q is an idempotent factorization.We have verified this conjecture for all square-free p < 2 14 .
For certain p − 1 prime, the resulting q can be quite large, requiring the use of heuristic algorithms for these cases.This is work in progress.Rather than view idempotency as an all-or-nothing property of a bipartite factorization, it may be viewed as a ratio between 0 and 1.In that case, the previous definition of idempotent factorizations could be regarded as indicating full idempotency because all (e, d) pairs have the desired idempotency property.A value of 0 corresponds to minimal idempotency, in which no non-trivial (e, d) pairs are functional RSA keys.Values in between indicate the idempotency ratio for a given n = p q factorization, based on the fraction of (e, d) pairs for which a ed ≡ n a ∀a ∈ Z n .
The (e, d) pairs that lend idempotency to a factorization of n = p q are exactly those for which ed ≡ L 1, where L = lcm(( p − 1)( q − 1), λ( p q)).The desired (e, d) are then exactly those solutions to the 2-variable system of nonlinear modular equations ed ≡ 1, where m 1 , m 2 ...m j are the prime power factors of L. Determining whether or not such systems have solutions and calculating their exact number are known NP-complete problems.Thus, simple, efficient calculations of idempotency ratios are likely to prove elusive.This is work in progress.
We conjecture that, due to redundancy in the equations for idempotency, no non-maximally idempotent integer n can have exactly one of its factorizations be non-idempotent.No counterexamples below 2 30 have been found.This suggests the question of the maximum number of idempotent factorizations an integer n with m prime factors can have without being maximally idempotent.Other questions include the asymptotic density of various kinds of idempotent factorizations, calculations of various idempotency ratios, the development of efficient algorithms to find idempotent factorizations, and more rigorous bounds on maximally idempotent integers.Finding idempotent factorizations connects factoring, graph theory, number theory, complexity theory, and cryptography.They depend on the relationship of products of primes p i and their immediate predecessors a i = p i − 1, so necessary and sufficient conditions for their existence beyond their defining equations are likely to prove elusive.
Various files related to idempotent factorizations are available at the Online Encyclopedia of Integer Sequences [7][8][9][10].Some of these ideas first appeared in preliminary form in [11].

For
the system of three nonlinear modular equations above consider the terms ab, ac, bc.If all of them are ≡ λ 0, all three equations are satisfied.If exactly two of them are ≡ λ 0, only one equation is satisfied.If exactly one is ≡ λ 0, no equations are satisfied.If none are ≡ λ 0, there are three possibilities: No equations are satisfied, one is satisfied if ab ≡ λ −ac, or three are satisfied if ab ≡ λ −ac, ab ≡ λ −bc.Thus, no integer n = p 1 p 2 p 3 can have exactly two idempotent factorizations.

Figure 2 .
Figure 2. Divisor graph for λ = 44,100.This graph has a total of 1293 k-cliques with k ≥ 3. The largest clique has 10 nodes, corresponding to the 10-factor maximally idempotent integer n = 211 × 421 × 631 × 1051 × 1471 × 6301 × 7351 × 8821 × 22,051 × 44,101.We may define a function µ(p) as the number of maximally idempotent integers M with λ(p) = p − 1 that can be constructed in this way.The domain of this function is the primes.The range is the set of numbers y that are the total number of k-cliques in the divisor graph for some p with λ(p) = p − 1, k ≥ 3. The first 16 nonzero values of µ(p) are shown in Table4.

Table 1 .
Values of n that admit idempotent factorizations.

Table 3 .
Maximally idempotent integers among the Carmichael numbers.

Table 5 .
Proportion of integers with idempotent factorizations.