WorksMathematics
On a problem on partitions into distinct primes
Abstract
For a positive integer , we write in place of the maximum number of distinct primes whose sum is , assuming there is a way of writing as a sum of distinct primes, with otherwise. Again if admits a partition into distinct primes, then we let denote the number of parts in the unique partition that has a largest product, with otherwise. In the latest editions of Guy's classic text on unsolved problems in number theory, the problem as to whether or not is unbounded was left open, and it appears that this has remained open. We solve this problem in the affirmative. Our proof relies, to a large extent, on a consequence of Vinogradov's theorem together with a 1948 result due to Sierpiński on the existence of primes whose gaps to the immediately preceding and following primes both exceed any prescribed positive bound.
Introduction
The study of partitions of integers into primes is of importance within many areas in additive number theory and in the number-theoretic study of integer partitions. This is evidenced by the roles played by Goldbach-type problems, not to mention research on asymptotic properties concerning the growth of prime partitions. In this paper, we solve, by building on our extensive interactions with GPT-6 Astra Pro, a problem that is given in the latest editions of Guy’s classic texts on unsolved problems in number theory [4 pp. 258–259] [5 p. 394] and that concerns partitions into primes and that seems to have remained open.
Guy [4 pp. 258–259] [5 p. 394] noted that Riddell and Taylor posed the following problem: Given any partitions of a positive integer into distinct primes, is it necessarily the case that the unique such partition with a maximal product of (distinct) parts is among the partitions of into (distinct) primes with a maximum number of parts? This was answered in the negative, via an explicit counterexample, by Selfridge, and McCranie later determined that Selfridge’s counterexample is the least counterexample. Guy then asked whether the cardinalities of the two sets suggested in the preceding question can differ by an arbitrarily large amount, and this is clarified below. This question is given as being open in both the latest edition of Guy’s text from 2004 and in the preceding version from 1994.
Let be a positive integer. Suppose that admits a partition into distinct primes. Among all finite sets of (distinct) primes whose elements sum to , we write to denote the set for which the product of the elements is greatest, noting that this is unique by the Fundamental Theorem of Arithmetic. Now, let be any (fixed) finite set that is of maximum cardinality and that consists of (distinct) primes summing to (noting that the value is unique and well defined, regardless of how is chosen according to the given conditions). We then write and . If is such that there are no partitions of into distinct primes, or if , then we let .
The above problem from Guy’s monograph on unsolved problems in number theory [4 §F19] [5 §F19] asks (in an equivalent way) whether or not is unbounded. This is equivalent to the proposition
We solve this problem in the affirmative in Section 2 below.
Background
The integer sequence defined above agrees with the entry in the On-line Encyclopedia of Integer Sequences1 indexed as A261153. It seems that the integer sequence , according to any equivalent version of the definition above for this sequence, is not currently indexed in the OEIS. The OEIS entry A053020 is defined, in an equivalent way, as the sequence of integers for which and differ, beginning with . Based on the extant material in the OEIS entry A053020, it seems that Guy’s problem, as formulated above, has not been solved previously.
A number of past research efforts have concerned topics related to Guy’s problem, as formulated above. Notably, Deléglise and Nicolas [1, 2] investigated the behavior of
Observe that: For each positive integer admitting a partition into distinct primes, the unique prime set attaining
as opposed to (2), is of cardinality (according to our definition of above). Letting denote the number of distinct prime factors of a positive integer , it follows from the work of Deléglise and Nicolas [1 Theorem 6.1 and Corollary 6.1] that
and Deléglise and Nicolas subsequently provided a related identity for [2 Theorem 2]. Thus the material from Deléglise–Nicolas is not directly applicable to the Guy problem stated above.
Also, Kumar [6] studied generating functions and related identities for the norms, or products of parts, of prime partitions in which repeated parts are permitted. The enumeration of partitions into primes has also been studied asymptotically; see, for example, Vaughan’s work [8].
For each positive integer admitting a partition into distinct primes, the minimum product of such a partition is the term of index in the OEIS sequence A064502; the entry assigns zero when no such partition exists.
A full solution
For a positive integer such that there exists at least one partition of into distinct primes, the set is one of the prime sets associated with the cardinality maximization used to define . Therefore, , and we see that the same relation holds for the remaining values for nonnegative integers , for which and vanish.
Let be a finite set consisting of integers exceeding 1. We then write and , with the understanding that and that . An inductive argument can be used to verify that
Now, suppose that , as defined above, consists of primes. Then we say that is product-minimal for its sum or simply product-minimal if for each finite set of primes such that . Also observe that: For each positive integer admitting a partition into distinct primes, a set of primes summing to with a minimal product exists and is unique (by the Fundamental Theorem of Arithmetic).
The following result is given in an equivalent way in a 1948 paper due to Sierpiński [7], and this, in turn, was proved using Dirichlet’s theorem on primes in arithmetic progressions [3]. For brevity, we omit repeating Sierpiński’s argument.
Lemma 1. [7] For each positive integer , there are arbitrarily large primes such that is the unique prime in [7].
Example 1. For , we may verify that the smallest primes as in Lemma 1 are as in Table 1. The integer sequence in the second column in Table 1 agrees with the OEIS sequence A137870.
| 6 | 211 | [?, ?] |
| 6 | 293 | [?, ?] |
| 6 | 409 | [?, ?] |
| 6 | 479 | [?, ?] |
| 6 | 631 | [?, ?] |
| 6 | 691 | [?, ?] |
| 6 | 701 | [?, ?] |
| 6 | 709 | [?, ?] |
| 6 | 719 | [?, ?] |
| 6 | 787 | [?, ?] |
Table 1. An illustration of Lemma 1, for and for the smallest associated values for .
Lemma 2. Let denote a nonempty and finite set of primes that is product-minimal. Then there are arbitrarily large primes such that is product-minimal.
Proof. Define . According to Lemma 1, it is possible to select an arbitrarily large prime that is the unique prime in . Since each member of is at most , we see that . Consequently, the relations among
and
hold. So, from the relations in (4) and (5), we find that there is at least one finite set of primes such that
and
We then let be an arbitrary set of this form.
We claim that it is necessarily the case that . In this direction, we set and . We thus have that
and
Of course, each element in is at most . This gives us that
A combined application of (9) and (10) gives us that
Of course, since has members, each of which exceeds , we find that
We may verify (using an inductive argument) that
holds for each positive integer . A combined application of (12) and (13) then produces
From (11) and (14) together, we deduce that
Observe that . So, the relation in (15) leads us to . By then exploiting the relation in (3), we arrive at the relations among
and
Using (8), (16), and (17) together, this gives us that
Now, observe that is prime. Also, recall that we chose as the unique prime in , by virtue of Lemma 1. So, from (18), we can conclude that the primes and are necessarily equal. So, from (6) and (7), respectively, we can deduce that and that . The given assumption on concerning product-minimality allows us to conclude that , whereas the Fundamental Theorem of Arithmetic gives us that . Consequently, the equality holds. Since no other (finite) prime set summing to is such that the product of its elements is at most , we obtain the desired result. □
Example 2. Let . It can be shown that this is product-minimal. Define . It can be shown that the smallest prime such that is product-minimal is 3,323,497. The next smallest such primes are shown in Table 2.
| 3,323,497 | |
| 6,200,989 | |
| 6,579,137 | |
| 7,686,541 | |
| 8,310,097 | |
| 8,707,537 | |
| 9,675,451 | |
| 10,631,471 | |
| 10,861,867 | |
| 10,894,189 |
Table 2. An illustration of Lemma 2, for and for the smallest associated values for primes .
Lemma 3. For each integer exceeding 1, there exist arbitrarily large odd integers whose product-minimal prime set is of size .
Proof. If is even, then we begin by setting . If is odd, then we start with . Observe that both singleton sets are product-minimal for their sums, as each of 2 and 3 admit only singleton prime partitions.
We then apply Lemma 2 successively times. With each application of Lemma 2, the appended prime is larger than the preceding sum, and is thus distinct from all of the previous primes. Also observe that each appended prime is necessarily odd.
After completing the above appending procedure, we find that the resulting product-minimal set has precisely elements. If is even, then it consists of 2 along with odd primes, so the associated sum is odd. If is odd, it consists of odd primes, so we again obtain an odd sum.
In either case, regardless of the parity of , the final application of Lemma 2 in the above procedure can be taken as being arbitrarily large. So, the resulting odd integer can be made to be arbitrarily large. □
:::
Example 3. For , it may be verified that the smallest odd integer whose product-minimal prime set has exactly elements is , and the corresponding unique product-minimal prime set is . The next smallest odd integers of the desired form, again for , are shown in Table 3.
| 3 | 27 | |
| 3 | 35 | |
| 3 | 51 | |
| 3 | 57 | |
| 3 | 65 | |
| 3 | 77 | |
| 3 | 87 | |
| 3 | 93 | |
| 3 | 95 | |
| 3 | 117 |
Table 3. An illustration of Lemma 3, for and for the smallest associated values for , with the associated unique product-minimal prime set being displayed in the final column.
Goldbach’s weak conjecture purports that each odd integer exceeding 5 can be written as the sum of three not necessarily distinct primes. It is well known that what is referred to as Vinogradov’s theorem [9] implies that any sufficiently large odd integer can be expressed as a sum of three not necessarily distinct prime numbers. However, we require a refinement of this consequence, as we require the distinctness of the primes in such an expression.
For a positive integer , define
letting it be understood that the tuples involved in (19) are ordered and that repeated primes are permitted. Vinogradov proved (cf. [9 Theorem 2]) that: There are constants and such that: For each odd integer , the relation
holds. This leads us to the following consequence of (20).
Lemma 4. Each sufficiently large odd integer is the sum of three pairwise distinct primes (cf. [9]).
Proof. For as defined in (19), we find that there exist at most triples of the form indicated in (19) such that , since, by fixing a choice for , the final entry is determined by . We obtain the same bound for triples satisfying and those satisfying . So, there are at most triples of the form indicated in (19) containing a repeated prime. Since
the formulation of Vinogradov’s theorem in (20) gives us that for all sufficiently large odd . So, at least one triple associated with (again for sufficiently large odd ) necessarily has three pairwise distinct entries.
We next require the following result related to the AM-GM inequality. As below, the expression denotes the familiar constant often referred to as Euler’s number.
Lemma 5. Let , and let . Let and be finite sets of integers satisfying
for and
for and and
Then the relations in
hold.
Proof. We begin by noting that , from one of the assumptions given above. Also, we observe that it is necessarily the case that , because, otherwise, we would have that , but this contradicts the hypothesis in (23). So, there exists a positive integer such that the elements in and can be written so that
and so that . By then writing
The condition in (23) then gives us that
The hypothesis associated with (22) gives us that each difference on the right of (26) is at least , and we thus obtain that
Observe that (recalling (24)). Also, from (24) and (25), we can deduce that . So, this leads us to the relations such that
By applying the arithmetic-geometric mean inequality to the positive numbers of the form for , and by then applying the elementary inequality , we find that
As a consequence, we obtain that
The expressions among , are pairwise unequal and all exceed 1 (recalling (21)), and thus . Consequently, we have that
Now, observe that the ratio of consecutive terms in the sequence of expressions of the form for is , and thus its minimum occurs at . Consequently, the relation
holds for positive integers .
Now, a combined application of (27), (28), (29), and (30) gives us that
Since , we obtain the desired result.
Now, for a given prime , define . Also, we define and , and this leads us toward the following Lemma.
Lemma 6. We write in place of the product-minimal prime set of sum , and we then let . Now, let be a prime, and let be the next prime after . Also, let , and assume that
Also, let . Then admits a partition into distinct primes, and its unique maximum-product prime set is , which, moreover, equals , for as defined in § 0.1.
Proof. Each element of is at most . We thus have that . So, the difference consists of distinct primes and is such that . Also observe that is nonempty, since . By construction, we also have that .
Now, let denote an arbitrary finite set of primes such that . We then write and .
From the above definitions of and , the set is obtained from by removing the elements of and adjoining the elements of , i.e., so that
Also, from the choice of and the definition of , we find that . This and (32) together give us that
Our construction also gives that
This leads us toward the following case analysis.
Case 1: First suppose that . From (33), we obtain that . Now, since is product-minimal for prime sets summing to , we find that . So, from (34), we find that
Equality in (35) holds if and only if . By the Fundamental Theorem of Arithmetic, this is equivalent to . Since , it follows that equality holds if and only if .
Case 2: Now, suppose that is nonempty. Observe that each element of is in . Each element of is a prime greater than , and is thus at least . Using Lemma 5 and (33), we obtain that
where the last inequality in (36) is implied by (31). From (34), we find that
So, if contains a prime greater than , then Case 2 gives , and, if each element of is at most , then Case 1 gives , with equality if and only if . Since was an arbitrary finite set of primes whose elements sum to these two cases show that for each such , with equality only when . As above, the elements of sum to . So, this set uniquely attains the maximum product, and, hence, by the definition of , we have that , as desired.
We are now in a position to prove our main result, as below, and to solve Guy’s problem in the affirmative.
Theorem 1. For each positive integer , there exist infinitely many positive integers admitting partitions into distinct primes for which $L(n) - K(n) \ge r.
Proof. Fix a positive integer , and define . By Lemma 3, we are permitted to choose an odd integer , sufficiently large so that Lemma 4 is applicable, such that the product-minimal prime set of has precisely elements, i.e., so that and . We then define so that . According to Lemma 4, there exists a set consisting of three distinct primes satisfying and . We henceforth let and and be fixed.
Now, we proceed to apply the Sierpiński Lemma, as formulated in Lemma 1, letting . So, there are infinitely many primes exceeding for which is the unique prime in . So, for each such , if is the next prime, then . We then set , with . By Lemma 6, we obtain that . Consequently, the equalities among
hold. Each prime in is at most , so that . As a consequence, the prime set is such that and is such that .
Now, recall the definitions of and given in § 0.1. By definition, the cardinality of is at least that of every finite set of primes whose elements sum to , with
A combined application of (37) and (38) then give us that
There are infinitely many eligible primes . Also, recall that
For eligible primes and such that , we have that
Since the right-hand side of (39) contains at least the positive term , since is prime, we find that . So, as increases through distinct primes, the value strictly increases. So, since is fixed, the integers of the form are distinct (as increases through distinct primes). So, for as given above, infinitely many positive integers are such that . Since was arbitrary, we obtain the desired result.
Conclusion
We briefly conclude with some further areas of study related to our construction given above.
Lemma 1 and the associated Table 1 raise questions in regard to growth properties associated with primes of the form given in Lemma 1, for fixed . In this direction, for a positive integer , and for a positive integer , we let denote the smallest prime such that is the unique prime in . Then, for example, the infinite array begins with
Each of the rows of the above array agrees with an extant OEIS sequence (up to offsets). For example, the second row agrees (up to an offset) with the OEIS sequence A007510 consisting of single primes. Similarly, the first column agrees with the OEIS sequence A102723, giving the smallest prime such that and , for , are all composite. Sierpiński [7] proved, in an equivalent way, that the integer sequence is indeed infinite (i.e., that does indeed exist for each positive integer ), but estimating the growth of this sequence is very difficult, since this is closely related to the behavior of prime gaps, i.e., since is the smallest prime whose gaps immediately to the left and right are both strictly greater than . The remaining columns of the above array do not appear to currently be in the OEIS, and the main diagonal is not currently in the OEIS, and we encourage the investigation of these integer sequences.
Lemma 2 and the associated Table 2 raise questions on the behavior of primes of the form , for a fixed set of primes that is product-minimal. For fixed , let denote the smallest prime such that and such that is product-minimal. What can be said in regard to the growth of for arbitrary and for fixed ?
Also, Lemma 3 and the associated Table 3 raise questions concerning the behavior of the expressions of the forms and involved in Lemma 3. In this direction, for a fixed integer , let denote the smallest odd integer whose product-minimal prime set is of size , and let denote the associated prime set. What can be said, for example, in regard to the behavior of for fixed and for arbitrary ? Or, say, for arbitrary and for fixed ? What can be said in regard to the behavior of for arbitrary and fixed , or for arbitrary and fixed ?
AI disclosure
As indicated above, our above solution to Guy’s problem is based on our extensive interactions with GPT-6 Astra Pro, and this is described in more detail below. All AI-generated suggestions were substantially revised, corrected, and independently verified by the author, who assumes full responsibility for the mathematical content. The author’s use of AI is fully in accordance with editorial standards on the responsible, ethical, and transparent use of AI.
On 2026-10-10, the author inputted a prompt into GPT-6 Astra Pro containing an equivalent version of the problem from Guy’s text given by determining whether or not (1) holds (with definitions given for and , and with an explicit attribution to Guy’s text on unsolved problems in number theory), concluding with an explicit request that GPT-6 Astra Pro solve the given problem. After 8m 42s of thinking, GPT-6 Astra Pro provided a response beginning with
I believe the following gives an affirmative proof, though a
claim settling this problem should be independently checked.
After extensive clarifications, corrections, revisions, suggestions, verifications, calculations, etc., through extensive discussions between the author and GPT-6 Astra Pro, and after extensive and careful reviews of such discussions on the part of the author, this provided a basis for the above solution, written by the author, to Guy’s problem.
For example, it was through the author’s investigations and computations associated with the infinite array illustrated in (40) that the author found (through the OEIS entry A102723) that the result given above as Lemma 1 was due (in an equivalent way) to Sierpiński [7], but GPT-6 Astra Pro had not previously been aware of this (and also was not able to access to the corresponding journal article).
References
- [1]M. Deléglise and J.-L. Nicolas. Maximal product of primes whose sum is bounded. Proc. Steklov Inst. Math., 282:S73–S102, 2013.
- [2]Marc Deléglise and Jean-Louis Nicolas. On the largest product of primes with bounded sum. J. Integer Seq., 18(2):article 15.2.8, 35, 2015.
- [3]P. G. L. Dirichlet. Beweis des Satzes, dass jede unbegrenzte arithmetische Progression, deren erstes Glied und Differenz ganze Zahlen ohne gemeinschaftlichen Factor sind, unendlich viele Primzahlen enthält. Abhandlungen der Königlich Preussischen Akademie der Wissenschaften, pages 45–81, 1837.
- [4]Richard K. Guy. Unsolved problems in number theory. Problem Books in Mathematics. Springer-Verlag, New York, second edition, 1994. Unsolved Problems in Intuitive Mathematics, I.
- [5]Richard K. Guy. Unsolved problems in number theory. Problem Books in Mathematics. Springer-Verlag, New York, third edition, 2004.
- [6]Abhimanyu Kumar. Analytic study of norms of prime partitions. Bull. Sci. Math., 171:Paper No. 103038, 12, 2021.DOI
- [7]W. Sierpiński. Remarque sur la répartition des nombres premiers. Colloq. Math., 1:193–194, 1948.DOI
- [8]R. C. Vaughan. On the number of partitions into primes. Ramanujan J., 15(1):109–121, 2008.DOI
- [9]I. M. Vinogradov. Some theorems concerning the theory of primes. Rec. Math. Moscow, n. Ser., 2:179–195, 1937.