1 Introduction

Partition theory has a long history. George E. Andrews [8, chapter 9] gives a survey on the theory of integer partitions. For positive integers m and n, the number of integer partitions of n into m distinct parts, denoted by D(mn), satisfies the inductive formula

$$\begin{aligned} D(m,n)=D(m,n-m)+D(m-1, n-m). \end{aligned}$$

This formula was discovered by Leonhard Euler [8]. In this paper, we focus on the study of prime partitions. If \(n=p_{j_1}+p_{j_2}+\cdots +p_{j_m}\) and \(p_{j_i}\) are primes for all \(1\le i\le m\), then we say \((p_{j_1}, p_{j_2},\ldots , p_{j_m})\) is a prime partition of n as m parts. To avoid duplication, we require \(p_{j_1}\le p_{j_2}\le \cdots \le p_{j_m}\).

In Sect. 2, we first consider prime partitions with distinct parts with the aim to generalize Euler’s formula. Let \(\mathcal {D}(m,n)\) denote the number of prime partitions of n into m distinct parts. We use two different methods to prove that \(\mathcal {D}(m,n)=\mathcal {E}(m,n)+\mathcal {E}(m-1,n-2)\), where \(\mathcal {E}(m,n)\) is the number of partitions of n into m distinct odd prime parts. For a given prime partition \(\lambda _m=(p_{j_1}, p_{j_2},\ldots , p_{j_m})\) of n with \(p_{j_i}<p_{j_{i+1}}\) for all \(1\le i \le m-1\), we can define the corresponding \(\kappa \)-constant \(\kappa _{m,n}^{\lambda _m}=\sum _{k=1}^{m} p_{j_{k}+1}-p_{j_k},\) which measures the sum of the differences between \(p_{j_k}\) and its next adjacent prime \(p_{j_{k}+1}\) in the set of primes

$$\begin{aligned} \mathcal {P}=\left\{ p_0=2, p_1=3, p_2=5, p_3=7, p_4=11, p_5=13, p_6=17, \ldots \right\} . \end{aligned}$$

By using generating functions, we prove that for positive integers m and N, if m and N have the same parity, then

$$\begin{aligned} \mathcal {D}(m,N)=\#\left\{ \lambda _m\vdash n \ |\ \kappa _{m,n}^{\lambda _m}+n=N, \forall n\le N-2m+1\right\} . \end{aligned}$$

If m and N have different parity, then

$$\begin{aligned} \mathcal {D}(m,N)=\#\left\{ \mu _{m-1}\vdash n \ |\ \kappa _{m-1,n}^{\mu _{m-1}}+n+2=N, \forall n\le N-2m+1\right\} . \end{aligned}$$

Next in Sect. 3 we consider general prime partitions with not necessarily distinct parts. In order to find inductive formulas to calculate the number of general prime partitions of n into m parts, denoted by Y(mn), we need to keep track of the recurrence of primes in a partition. Let \(S_{m,n}^{p(r)}\) denote the set of prime partitions of n as m parts with the prime p occurring r times, where \(0\le r \le \min \{m,\lfloor \frac{n}{p}\rfloor \} \) is an integer. Let \(Y_{p(r)}(m,n)\) denote the cardinality of the set \(S_{m,n}^{p(r)}\). We prove that \(Y_{p(r)}(m,n)=Y_{p(r+1)}(m+1,n+p)\) by constructing a bijective map between the set \(S_{m,n}^{p(r)}\) and the set \(S_{m+1,n+p}^{p(r+1)}\). This bijection method is also generalized to consider multiple primes at the same time in Theorem 3.4. Theorem 3.5 gives an inductive formula to calculate \(Y(m,n+(m-2)\times p)\). The special case of Theorem 3.5 when \(n=2\times p\) recovers the result in [9].

Finally, in Sect. 4, through numerical experimentation we obtain an approximation of some analytical formulas for Y(mn) when \(m=4,5,6,7,8,9,10\). We find for a fixed m, the function Y(mn) is approximately a power function of n when n is large. We give the parameters for the power functions in Table 1.

Table 1 Fitted data

2 Prime Partitions with Distinct Parts

In [8] chapter 9 on partitions, George E. Andrews presented an inductive formula discovered by Leonhard Euler to find the number of partitions into distinct parts. Let D(mn) be the number of partitions of a given integer n into m distinct parts. Then, by using generating functions, Euler proved

$$\begin{aligned} D(m,n)=D(m,n-m)+D(m-1, n-m). \end{aligned}$$

In this section, we will present two generalizations of the Euler’s formula to the case of prime partitions. Theorem 2.1 is a more straightforward generalization, while Theorem 2.2 is a subtler generalization. Let \(\mathcal {D}(m,n)\) denote the number of partitions of a given integer n into m distinct prime parts. Consider the generating function \(\sum _{m,n\ge 1}\mathcal {D}(m,n)z^m q^n\). Let

$$\begin{aligned} \mathcal {P}=\left\{ p_0=2, p_1=3, p_2=5, p_3=7, p_4=11, p_5=13, p_6=17, \ldots \right\} \end{aligned}$$

be the set of primes. Note that we use \(p_0\) to denote the even prime 2 and \(p_i\) (\(i\ge 1\)) to denote the i-th odd prime number. Then, we have the identity

$$\begin{aligned} \sum _{m,n\ge 0}\mathcal {D}(m,n)z^m q^n=\prod _{j=0}^{\infty }\left( 1+zq^{p_j}\right) . \end{aligned}$$

This equality holds because a typical term in \(\prod _{j=0}^{\infty }(1+zq^{p_j})\) has the form

$$\begin{aligned} \left( zq^{p_{j_1}}\right) \left( zq^{p_{j_2}}\right) \cdots \left( zq^{p_{j_m}}\right) =z^m q^{p_{j_1}+p_{j_2}+\cdots p_{j_m}} \end{aligned}$$

which arises from the partition of \(n=p_{j_1}+p_{j_2}+\cdots p_{j_m}\) as m distinct prime parts.

Theorem 2.1

Let mn be positive integers. Let \(\mathcal {E}(m,n)\) be the number of ways to write n as a sum of m distinct odd prime numbers. Then, we have

$$\begin{aligned} \mathcal {D}(m,n)=\mathcal {E}(m,n)+\mathcal {E}(m-1,n-2). \end{aligned}$$

Proof

Since \(\sum _{m,n\ge 0}\mathcal {D}(m,n)z^m q^n=\prod _{j=0}^{\infty }(1+zq^{p_j})\), we know

$$\begin{aligned} \sum _{m,n\ge 0}\mathcal {D}(m,n)z^m q^n=(1+zq^2)\prod _{j=1}^{\infty }(1+zq^{p_j}). \end{aligned}$$

Because \(\sum _{m,n\ge 0}\mathcal {E}(m,n)z^m q^n=\prod _{j=1}^{\infty }(1+zq^{p_j})\), we have

$$\begin{aligned} \sum _{m,n\ge 0}\mathcal {D}(m,n)z^m q^n= & {} (1+zq^2)\sum _{m,n\ge 0}\mathcal {E}(m,n)z^m q^n\\= & {} \sum _{m,n\ge 0}\mathcal {E}(m,n)z^m q^n+\sum _{m,n\ge 0}\mathcal {E}(m,n)z^{m+1} q^{n+2}. \end{aligned}$$

Comparing the coefficients for \(z^m q^n\) from both sides of the above equation, we get

$$\begin{aligned} \mathcal {D}(m,n)=\mathcal {E}(m,n)+\mathcal {E}(m-1,n-2). \end{aligned}$$

\(\square \)

Note that an alternative proof of Theorem 2.1 can be achieved by discussing the parity of n and m. In fact, when both n and m are even, we know that any partition of n as m distinct prime parts cannot contain the prime 2; thus, \(\mathcal {D}(m,n)=\mathcal {E}(m,n)\). We also know that \(n-2\) is even and \(m-1\) is odd, so any partition of \(n-2\) as \(m-1\) distinct prime parts must contain the prime 2; hence, \(\mathcal {E}(m-1,n-2)=0\). Therefore, \(\mathcal {D}(m,n)=\mathcal {E}(m,n)+\mathcal {E}(m-1,n-2)\). When n is even, m is odd; we know any partition of n as m distinct prime parts must contain the prime 2; thus, \(\mathcal {E}(m,n)=0\). Since \(n-2\) is even and \(m-1\) is even, we know any partition of \(n-2\) as \(m-1\) distinct prime parts cannot contain the prime 2. Therefore, any prime partition \((p_{j_1}, p_{j_2},\ldots , p_{j_{m-1}})\) of \(n-2\) as \(m-1\) distinct odd prime parts gives rises to a prime partition \((2, p_{j_1}, p_{j_2},\ldots , p_{j_{m-1}})\) of n as m distinct prime parts, and vice versa. Hence, \(\mathcal {D}(m,n)=\mathcal {E}(m-1,n-2)\). Similar discussions show that \(\mathcal {D}(m,n)=\mathcal {E}(m-1,n-2)\) and \(\mathcal {E}(m,n)=0\) for n being odd and m being even. For the final case of both n and m being odd, we have \(\mathcal {D}(m,n)=\mathcal {E}(m,n)\) and \(\mathcal {E}(m-1,n-2)=0\).

In order to show the next theorem, we introduce the following notations. Let

$$\begin{aligned} \lambda _m=(p_{j_1}, p_{j_2},\ldots , p_{j_{m}}) \end{aligned}$$

with \(p_{j_i}<p_{j_{i+1}}\) for all \(i=1,\ldots , m-1\). We denote a partition of n as m distinct prime parts by \(\lambda _m \vdash n\). For each partition \(\lambda _m \vdash n\), define the corresponding \(\kappa \)-constant

$$\begin{aligned} \kappa _{m,n}^{\lambda _m}=\sum _{k=1}^{m} p_{j_{k}+1}-p_{j_k}, \end{aligned}$$

which measures the sum of the differences between \(p_{j_k}\) and its next adjacent prime \(p_{j_{k}+1}\) in \(\mathcal {P}\). For example, when \(n=50\) and \(m=3\), we have the following five prime partitions of 50 into 3 distinct prime parts:

$$\begin{aligned} (2,5,43);\ \ (2,7,41);\ \ (2,11,37);\ \ (2,17,31);\ \ (2,19,29). \end{aligned}$$

The corresponding \(\kappa \)-constant for each partition will be

$$\begin{aligned} \kappa _{3,50}^{(2,5,43)}= & {} (3-2)+(7-5)+(47-43)=7;\\ \kappa _{3,50}^{(2,7,41)}= & {} (3-2)+(11-7)+(43-41)=7;\\ \kappa _{3,50}^{(2,11,37)}= & {} (3-2)+(13-11)+(41-37)=7;\\ \kappa _{3,50}^{(2,17,31)}= & {} (3-2)+(19-17)+(37-31)=9;\\ \kappa _{3,50}^{(2,19,29)}= & {} (3-2)+(23-19)+(31-29)=7. \end{aligned}$$

We notice that these \(\kappa \)-constants may not be the same for a fixed n and m. It depends on the specific partition \(\lambda _m \vdash n\). Taking this into consideration, we have the following generalization of the Euler’s inductive formula for D(mn) to the prime partition case.

Theorem 2.2

Let N be a positive integer. Let \(\mathcal {D}(m,N)\) be the number of prime partitions of N into m distinct prime parts. Then,

$$\begin{aligned} \mathcal {D}(m,N)= & {} \#\left\{ \lambda _m\vdash n \ |\ \kappa _{m,n}^{\lambda _m}+n=N, \forall n\le N-2m+1\right\} \\&+\,\#\left\{ \mu _{m-1}\vdash n \ |\ \kappa _{m-1,n}^{\mu _{m-1}}+n+2=N, \forall n\le N-2m+1\right\} . \end{aligned}$$

Proof

Recall that \(\sum _{m,n\ge 0}\mathcal {D}(m,N)z^m q^N=\prod _{j=0}^{\infty }(1+zq^{p_j})\); thus,

$$\begin{aligned} \sum _{m,n\ge 0}\mathcal {D}(m,N)z^m q^N= & {} (1+zq^2)\prod _{j=1}^{\infty }\left( 1+zq^{p_j}\right) \\= & {} (1+zq^2)\prod _{j=0}^{\infty }\left( 1+\left( zq^{p_{j+1}-p_j}\right) q^{p_j}\right) . \end{aligned}$$

A typical term in \(\prod _{j=0}^{\infty }(1+(zq^{p_{j+1}-p_j})q^{p_j})\) has the form

$$\begin{aligned}&\left( zq^{p_{j_{1}+1}-p_{j_1}}\right) q^{p_{j_1}}\left( zq^{p_{j_{2}+1}-p_{j_2}}\right) q^{p_{j_2}}\cdots (zq^{p_{j_{m}+1}-p_{j_m}})q^{p_{j_m}}\\&\quad =z^mq^{\kappa _{m,n}^{\lambda _m}+p_{j_1}+p_{j_2}+\cdots p_{j_m}}, \end{aligned}$$

where \(\lambda _m=(p_{j_1},p_{j_2},\ldots ,p_{j_m})\vdash n\) is a prime partition of n into m distinct prime parts. Therefore,

$$\begin{aligned} \prod _{j=0}^{\infty }\left( 1+(zq^{p_{j+1}-p_j})q^{p_j}\right) =\sum _{m,n\ge 0}\left( \sum _{\lambda _m\vdash n}q^{\kappa _{m,n}^{\lambda _m}}\right) z^mq^n. \end{aligned}$$

Hence,

$$\begin{aligned} \sum _{m,n\ge 0}\mathcal {D}(m,N)z^m q^N= & {} (1+zq^2)\sum _{m,n\ge 0}\left( \sum _{\lambda _m\vdash n}q^{\kappa _{m,n}^{\lambda _m}}\right) z^mq^n\\= & {} \sum _{m,n\ge 0}\left( \sum _{\lambda _m\vdash n}q^{\kappa _{m,n}^{\lambda _m}}\right) z^mq^n+\sum _{m,n\ge 0}\left( \sum _{\lambda _m\vdash n}q^{\kappa _{m,n}^{\lambda _m}}\right) z^{m+1}q^{n+2}. \end{aligned}$$

Comparing the coefficients for \(z^m q^N\) from both sides of the above equation, we get

$$\begin{aligned} \mathcal {D}(m,N)= & {} \#\left\{ \lambda _m\vdash n \ |\ \kappa _{m,n}^{\lambda _m}+n=N, \forall n\ge 0\right\} \\&+ \,\#\left\{ \mu _{m-1}\vdash n \ |\ \kappa _{m-1,n}^{\mu _{m-1}}+n+2=N, \forall n\ge 0\right\} . \end{aligned}$$

Since \(\kappa _{m,n}^{\lambda _m}\ge 1+2(m-1)=2m-1\), in order for \(\kappa _{m,n}^{\lambda _m}+n=N\) to hold, we will always have \(n\le N-2m+1\). Similarly in order for \(\kappa _{m-1,n}^{\mu _{m-1}}+n+2=N\) to hold, we will have the restriction \(n\le N-2m+1\). Therefore,

$$\begin{aligned} \mathcal {D}(m,N)= & {} \#\left\{ \lambda _m\vdash n \ |\ \kappa _{m,n}^{\lambda _m}+n=N, \forall n\le N-2m+1\right\} \\&+\,\#\left\{ \mu _{m-1}\vdash n \ |\ \kappa _{m-1,n}^{\mu _{m-1}}+n+2=N, \forall n\le N-2m+1\right\} . \end{aligned}$$

\(\square \)

The following proposition observes that the two sets in the right side of the equation for \(\mathcal {D}(m,N)\) in Theorem 2.2 cannot be nonempty at the same time.

Proposition 2.3

Let mN be positive integers. If m and N have the same parity, then

$$\begin{aligned} \mathcal {D}(m,N)=\#\left\{ \lambda _m\vdash n \ |\ \kappa _{m,n}^{\lambda _m}+n=N, \forall n\le N-2m+1\right\} . \end{aligned}$$

If m and N have different parity, then

$$\begin{aligned} \mathcal {D}(m,N)=\#\left\{ \mu _{m-1}\vdash n \ |\ \kappa _{m-1,n}^{\mu _{m-1}}+n+2=N, \forall n\le N-2m+1\right\} . \end{aligned}$$

Proof

We will discuss the case when m is even and the case when m is odd separately.

First assume m is even. If n is even, then any \(\lambda _m\vdash n\) must not contain 2. Thus, the corresponding \(\kappa _{m,n}^{\lambda _m}\) must be even because when calculating the summation for the \(\kappa \)-constant, every gap between successive odd primes is even. So \(\kappa _{m,n}^{\lambda _m}+n\) is even. If n is odd, then any \(\lambda _m\vdash n\) must include 2. Hence, the corresponding \(\kappa _{m,n}^{\lambda _m}\) must be odd because the gap between the primes 2 and 3 is 1, which is the only odd gap between prime numbers. Again, we see that \(\kappa _{m,n}^{\lambda _m}+n\) is even. Similar discussions show that \(\kappa _{m-1,n}^{\mu _{m-1}}+n+2\) is always odd. Therefore, if N is even, then by Theorem 2.2 we have

$$\begin{aligned} \mathcal {D}(m,N)=\#\left\{ \lambda _m\vdash n \ |\ \kappa _{m,n}^{\lambda _m}+n=N, \forall n\le N-2m+1\right\} . \end{aligned}$$

If N is odd, then by Theorem 2.2 we have

$$\begin{aligned} \mathcal {D}(m,N)=\#\left\{ \mu _{m-1}\vdash n \ |\ \kappa _{m-1,n}^{\mu _{m-1}}+n+2=N, \forall n\le N-2m+1\right\} . \end{aligned}$$

Next assume m is odd. Similar discussions show that \(\kappa _{m,n}^{\lambda _m}+n\) is always odd and \(\kappa _{m-1,n}^{\mu _{m-1}}+n+2\) is always even. Therefore, if N is odd, then by Theorem 2.2 we have

$$\begin{aligned} \mathcal {D}(m,N)=\#\left\{ \lambda _m\vdash n \ |\ \kappa _{m,n}^{\lambda _m}+n=N, \forall n\le N-2m+1\right\} . \end{aligned}$$

If N is even, then by Theorem 2.2 we have

$$\begin{aligned} \mathcal {D}(m,N)=\#\left\{ \mu _{m-1}\vdash n \ |\ \kappa _{m-1,n}^{\mu _{m-1}}+n+2=N, \forall n\le N-2m+1\right\} . \end{aligned}$$

\(\square \)

The following two examples illustrate how to use Proposition 2.3 to calculate \(\mathcal {D}(m,n)\).

Example 2.1

Let \(N=29\) and \(m=3\). In order to calculate \(\mathcal {D}(3,29)\), we check all the prime partitions \(\lambda _3\vdash n\) such that \(\kappa _{3,n}^{\lambda _3}+n=29\) for all \(n\le 29-2\times 3+1=24\). It turns out there are three prime partitions that satisfy this condition

$$\begin{aligned} (3,5,13)\vdash 21; \ \ (3,7,11)\vdash 21;\ \ (2,5,17)\vdash 24, \end{aligned}$$

where the corresponding \(\kappa \)-constants are

$$\begin{aligned} \kappa _{3,21}^{(3,5,13)}=8;\ \ \kappa _{3,21}^{(3,7,11)}=8;\ \ \kappa _{3,24}^{(2,5,17)}=5. \end{aligned}$$

Since m and N have the same parity, by Proposition 2.3 we have

$$\begin{aligned} \mathcal {D}(3,29)=\#\left\{ \lambda _3\vdash n \ |\ \kappa _{3,n}^{\lambda _3}+n=29, \forall n\le 24\right\} =3. \end{aligned}$$

We can verify using Mathematica code that there are only three prime partitions of 29 into 3 distinct prime parts, namely \((3, 7, 19);\ \ (5,7,17);\ \ (5,11,13)\).

Example 2.2

Let \(N=43\) and \(m=4\). Since m and N have different parity, we only need to check all the prime partitions \(\mu _3\vdash n\) which satisfy \(\kappa _{3,n}^{\mu _3}+n+2=43\) for \(n\le 43-2\times 4+1=36\). It turns out there are six prime partitions that satisfy this condition

$$\begin{aligned}&(3,5,23)\vdash 31; \ \ (5,7,19)\vdash 31;\ \ (7,11,13)\vdash 31;\\&(3,11,19)\vdash 33; \ \ (3,13,17)\vdash 33;\ \ (2,5,29)\vdash 36, \end{aligned}$$

where the corresponding \(\kappa \)-constants are

$$\begin{aligned}&\kappa _{3,31}^{(3,5,23)}=10;\ \ \kappa _{3,31}^{(5,7,19)}=10;\ \ \kappa _{3,31}^{(7,11,13)}=10;\\&\kappa _{3,33}^{(3,11,19)}=8;\ \ \kappa _{3,33}^{(3,13,17)}=8;\ \ \kappa _{3,36}^{(2,5,29)}=5. \end{aligned}$$

Therefore, by Proposition 2.3 we have

$$\begin{aligned} \mathcal {D}(4,43)=\#\left\{ \mu _{3}\vdash n \ |\ \kappa _{3,n}^{\mu _{3}}+n+2=41, \forall n\le 36\right\} =6. \end{aligned}$$

We can verify using Mathematica code that there are only six prime partitions of 43 into 4 distinct prime parts, namely

$$\begin{aligned} (2, 3, 7, 31);\ \ (2,5,7,29);\ \ (2,5,13,23);\ \ (2,5,17,19);\ \ (2,7,11,23); \ \ (2,11,13,17). \end{aligned}$$

3 General Prime Partitions

In this section, we consider general prime partitions whose prime parts are not necessarily distinct. Let Y(mn) denote the number of prime partitions of n as m parts. The binary Goldbach conjecture states that \(Y(2,n)\ge 1\) for every even integer \(n\ge 4\). Jingrun Chen’s longstanding results in [1, 2] showed that there exists a positive constant \(N_0\) such that every even integer greater than \(N_0\) can be written as the sum of a prime and the product of at most two primes. The binary Goldbach conjecture was verified up to \(n=4\times 10^{18}\) [7]. The binary Goldbach conjecture implies the ternary Goldbach conjecture which states that \(Y(3,n)\ge 1\) for every odd integer \(n>5\). The ternary Goldbach conjecture was proved by Helfgott [3, 5].

Let \(\lambda _m=(p_{j_1}, p_{j_2},\ldots , p_{j_{m}})\) with \(p_{j_1}\le p_{j_2}\le \cdots \le p_{j_m}\) be a prime partition of \(n=p_{j_1}+p_{j_2}+\cdots +p_{j_m}\) as m parts. Suppose

$$\begin{aligned} p_{j_k}<p_{j_{k+1}}=p_{j_{k+2}}=\cdots =p_{j_{k+r}}=p<p_{j_{k+r+1}}, \end{aligned}$$

then we denote the partition as \(\lambda _m^{p(r)}\), which means that the prime p appears r times in the partition \(\lambda _m\). Let \(S_{m,n}^{p(r)}\) denote the set of prime partitions of n as m parts with the prime p occurring r times. Then, if \(r_1\ne r_2\), we have

$$\begin{aligned} S_{m,n}^{p(r_1)}\bigcap S_{m,n}^{p(r_2)}=\emptyset . \end{aligned}$$

Let \(S_{m,n}\) denote the set of prime partitions of n as m parts. Then,

$$\begin{aligned} S_{m,n}=\bigcup _{r=0}^{\min \left\{ m,\left\lfloor \frac{n}{p}\right\rfloor \right\} } S_{m,n}^{p(r)}. \end{aligned}$$

We observe that if \(n-\lfloor \frac{n}{p}\rfloor \times p\) can be written as a sum of primes, then \(S_{m,n}^{p(\lfloor \frac{n}{p}\rfloor )}\ne \emptyset \); otherwise, we will have \(S_{m,n}^{p(\lfloor \frac{n}{p}\rfloor )}= \emptyset \). Clearly Y(mn) equals the cardinality of the set \(S_{m,n}\). Let \(Y_{p(r)}(m,n)\) denote the cardinality of the set \(S_{m,n}^{p(r)}\), then

$$\begin{aligned} Y(m,n)=\sum _{r=0}^{\min \left\{ m,\left\lfloor \frac{n}{p}\right\rfloor \right\} } Y_{p(r)}(m,n). \end{aligned}$$
(1)

For example, using Mathematica code we can verify that \(Y(4,67)=21\), and

$$\begin{aligned} Y_{3(0)}(4,67)=18,\ \ Y_{3(1)}(4,67)=2,\ \ Y_{3(2)}(4,67)=1, \end{aligned}$$

and \(Y_{3(r)}(4,67)=0\) for all \(3\le r\le 4\). Therefore,

$$\begin{aligned} Y(4,67)=\sum _{r=0}^{4} Y_{3(r)}(4,67). \end{aligned}$$

The following theorem is an observation of the equality between \(Y_{p(r)}(m,n)\) and \(Y_{p(r+1)}(m+1,n+p)\).

Theorem 3.1

Let \(0\le r \le \min \{m,\lfloor \frac{n}{p}\rfloor \} \) be an integer. Then, we have

$$\begin{aligned} Y_{p(r)}(m,n)=Y_{p(r+1)}(m+1,n+p). \end{aligned}$$

Proof

We will show there exists a bijective map between the set \(S_{m,n}^{p(r)}\) and the set \(S_{m+1,n+p}^{p(r+1)}\). Let

$$\begin{aligned} \lambda _m=\left( p_{j_1},p_{j_2},\ldots ,p_{j_k},p,p,\ldots ,p,p_{j_{k+r+1}},\ldots ,p_{j_m}\right) \in S_{m,n}^{p(r)}. \end{aligned}$$

Define

$$\begin{aligned} \lambda '_{m+1}=\left( p'_{j_1},p'_{j_2},\ldots ,p'_{j_k},p,p,\ldots ,p,p'_{j_{k+r+2}},\ldots ,p'_{j_{m+1}}\right) , \end{aligned}$$

where \(p'_{j_i}=p_{j_i}\) for \(i=1,2,\ldots , k\) and \(p'_{j_i}=p_{j_{i-1}}\) for \(i=k+r+2,\ldots , m+1\). Then, \(\lambda '_{m+1}\in S_{m+1,n+p}^{p(r+1)}\). Define \(f_{r}:S_{m,n}^{p(r)}\rightarrow S_{m+1,n+p}^{p(r+1)}\) by \(f_{r}(\lambda _m)=\lambda '_{m+1}\), then \(f_{r_{}}\) is a well-defined map. Conversely, let

$$\begin{aligned} \mu _{m+1}=\left( p_{j_1},p_{j_2},\ldots ,p_{j_k},p,p,\ldots ,p,p_{j_{k+r+2}},\ldots ,p_{j_{m+1}}\right) \in S_{m+1,n+p}^{p(r+1)}. \end{aligned}$$

Define

$$\begin{aligned} \mu '_m=\left( p'_{j_1},p'_{j_2},\ldots ,p'_{j_k},p,p,\ldots ,p,p'_{j_{k+r+1}},\ldots ,p'_{j_m}\right) , \end{aligned}$$

where \(p'_{j_i}=p_{j_i}\) for \(i=1,2,\ldots , k\) and \(p'_{j_i}=p_{j_{i+1}}\) for \(i=k+r+1,\ldots , m\). Define \(g_{r}:S_{m+1,n+p}^{p(r+1)}\rightarrow S_{m,n}^{p(r)}\) by \(g_{r}(\mu _{m+1})=\mu '_{m}\), then \(g_r\) is a well-defined map. It is easy to check that

$$\begin{aligned} g_r\circ f_r=\text {id}_{S_{m,n}^{p(r)}}\text { and }f_r\circ g_r=\text {id}_{S_{m+1,n+p}^{p(r+1)}}. \end{aligned}$$

Therefore, \(f_r:S_{m,n}^{p(r)}\rightarrow S_{m+1,n+p}^{p(r+1)}\) is a bijective map. Thus, we have

$$\begin{aligned} Y_{p(r)}(m,n)=Y_{p(r+1)}(m+1,n+p). \end{aligned}$$

\(\square \)

Corollary 3.2

Let \(r\ge 0\) be an integer. Then, we have

$$\begin{aligned} Y_{p(r)}(m,m\times p)=Y_{p(r+1)}(m+1,(m+1)\times p). \end{aligned}$$

Proof

Let \(n=m\times p\). Theorem 3.1 implies that

$$\begin{aligned} Y_{p(r)}(m,m\times p)=Y_{p(r+1)}(m+1,m\times p+p)=Y_{p(r+1)}(m+1,(m+1)\times p). \end{aligned}$$

\(\square \)

Corollary 3.3

Let \(r\ge 0\) be an integer. Then, we have

$$\begin{aligned} Y_{p(r)}(m,n)=Y_{p(r+p)}(m+p,n+p^2). \end{aligned}$$

Proof

Applying Theorem 3.1 repeatedly for p times, we get

$$\begin{aligned} Y_{p(r)}(m,n)= & {} Y_{p(r+1)}(m+1,n+p)\\= & {} Y_{p(r+2)}(m+2,n+2p)\\= & {} \cdots \\= & {} Y_{p(r+p)}(m+p,n+p\times p)\\= & {} Y_{p(r+p)}(m+p,n+p^2). \end{aligned}$$

\(\square \)

The method we use to prove Theorem 3.1 by constructing a bijective map between the set \(S_{m,n}^{p(r)}\) and the set \(S_{m+1,n+p}^{p(r+1)}\) can be generalized to consider multiple primes at the same time. Given a positive integer n, let \(p_{\tilde{l}}\) be the biggest prime in \(\mathcal {P}\) such that \(p_{\tilde{l}}< n\). Recall that we use \(p_0\) to denote the even prime 2 and \(p_{i}\) (\(i\ge 1\)) to denote the i-th odd prime number. Let \(l\le \tilde{l}\). Let \(\mathbf {p}=(p_1,p_2,\ldots ,p_l)\) and \(\mathbf {r}=(r_1,r_2,\ldots ,r_l)\), where \(p_i\) are primes and \(0 \le r_i \le \min \{m,\lfloor \frac{n}{p_i}\rfloor \}\) for \(1\le i\le l\). Let \(S_{m,n}^\mathbf{p (\mathbf r )}\) denote the set of prime partitions of n as m parts with the prime \(p_i\) occurring \(r_i\) times for \(1\le i\le l\). Clearly we have

$$\begin{aligned} S_{m,n}^{\mathbf {p}(\mathbf {r})}\bigcap S_{m,n}^{\mathbf {p'}(\mathbf {r'})}\ne \emptyset \text { if and only if } \mathbf {p}=\mathbf {p'} \text { and }\mathbf {r}=\mathbf {r'}. \end{aligned}$$

Let \(Y_{\mathbf {p}(\mathbf {r})}(m,n)\) denote the cardinality of the set \(S_{m,n}^{\mathbf {p}(\mathbf {r})}\). The following result generalizes Theorem 3.1 to consider multiple primes at the same time.

Theorem 3.4

Given a positive integer n, let \(p_{\tilde{l}}\) be the biggest prime in \(\mathcal {P}\) such that \(p_{\tilde{l}}< n\). Let \(l\le \tilde{l}\). Let \(\mathbf {p}=(p_1,p_2,\ldots ,p_l)\) and \(\mathbf {r}=(r_1,r_2,\ldots ,r_l)\), where \(p_i\) are primes and \(0 \le r_i \le \min \{m,\lfloor \frac{n}{p_i}\rfloor \}\) for \(1\le i\le l\). Let \(\mathbf {s}=(s_1,s_2,\ldots ,s_l)\), where \(s_i\ge 0\) are integers for \(1\le i\le l\). Then, we have

$$\begin{aligned} Y_{\mathbf {p}(\mathbf {r})}(m,n)=Y_{\mathbf {p}(\mathbf {r}+\mathbf {s})}\left( m+\sum _{i=1}^{l}s_i,n+\sum _{i=1}^{l}s_i p_i\right) . \end{aligned}$$

Proof

Let \(m'=m+\sum _{i=1}^{l}s_i\) and \(n'=n+\sum _{i=1}^{l}s_i p_i\). We can define a bijective map

$$\begin{aligned} f_{\mathbf {r},\mathbf {s}}:S_{m,n}^{\mathbf {p}(\mathbf {r})} \rightarrow S_{m',n'}^{\mathbf {p}(\mathbf {r}+\mathbf {s})}. \end{aligned}$$

In fact, let \(\lambda _m=(p_1,\ldots , p_1, p_2,\ldots , p_2, \ldots , p_l,\ldots , p_l)\) be a prime partition of n as m parts, with \(p_i\) occurring \(r_i\) times, then \(\sum _{i=1}^{l} r_i p_i =n\). Let \(\lambda _{m'}\) be the partition obtained by inserting \(s_i\) copies of \(p_i\) (for all \(1\le i\le l\)) to \(\lambda _{m}\). Then, clearly \(\lambda _{m'}\) is a prime partition of \(n'\) as \(m'\) parts, with \(p_i\) occurring \(r_i+s_i\) times. Thus, \(\lambda _{m'}\in S_{m',n'}^{\mathbf {p}(\mathbf {r}+\mathbf {s})}\). The map \(f_{\mathbf {r},\mathbf {s}}\) is bijective because we can easily construct the inverse map

$$\begin{aligned} g_{\mathbf {r},\mathbf {s}}: S_{m',n'}^{\mathbf {p}(\mathbf {r}+\mathbf {s})}\rightarrow S_{m,n}^{\mathbf {p}(\mathbf {r})} \end{aligned}$$

by sending a prime partition \(\mu _{m'}\in S_{m',n'}^{\mathbf {p}(\mathbf {r}+\mathbf {s})}\) to \(\mu _{m}\), where \(\mu _{m}\) is obtained by deleting \(s_i\) copies of \(p_i\) (for all \(1\le i\le l\)) in \(\mu _{m'}\). Clearly \(\mu _{m}\in S_{m,n}^{\mathbf {p}(\mathbf {r})}\) and

$$\begin{aligned} g_{\mathbf {r},\mathbf {s}}\circ f_{\mathbf {r},\mathbf {s}}=\text {id}_{S_{m,n}^{\mathbf {p}(\mathbf {r})}}\text { and }f_{\mathbf {r},\mathbf {s}}\circ g_{\mathbf {r},\mathbf {s}}=\text {id}_{S_{m',n'}^{\mathbf {p}(\mathbf {r}+\mathbf {s})}}. \end{aligned}$$

\(\square \)

Example 3.1

Let \(m=4\) and \(n=67\). We know \(Y(4,67)=21\). The biggest prime number less than 67 is \(p_{17}=61\), the 17-th odd prime. Let \(l=3\). Let \(\mathbf {p}=(2,3,5)\) and \(\mathbf {r}=(1,0,1)\). Using Mathematica code, we can see that among the 21 partitions there are only 6 partitions with 2 occurring only once, 3 occurring zero times, and 5 occurring only once. Therefore, \(Y_{\mathbf {p}(\mathbf {r})}(4,67)=6\) and the partitions in \(S_{4,67}^{\mathbf {p}(\mathbf {r})}\) are

$$\begin{aligned}&(2,5,7,53);\ \ (2,5,13,47);\ \ (2,5,17,43);\\&(2,5,19,41);\ \ (2,5,23,37);\ \ (2,5,29,31). \end{aligned}$$

Let \(\mathbf {s}=(1,2,0)\). Then, \(\mathbf {r}+\mathbf {s}=(2,2,1)\). By Theorem 3.4 we know \(Y_{\mathbf {p}(\mathbf {r}+\mathbf {s})}(7,75)=6\). We can verify this by using Mathematica. The total number of prime partitions of 75 as 7 parts is \(Y(7,75)=322\). Among these 322 partitions there are only 6 partitions with 2 occurring twice, 3 occurring twice, and 5 occurring only once. The partitions in \(S_{7,75}^{\mathbf {p}(\mathbf {r}+\mathbf {s})}\) are

$$\begin{aligned}&(2,2,3,3,5,7,53);\ \ (2,2,3,3,5,13,47);\ \ (2,2,3,3,5,17,43);\\&(2,2,3,3,5,19,41);\ \ (2,2,3,3,5,23,37);\ \ (2,2,3,3,5,29,31). \end{aligned}$$

The following theorem provides an inductive formula by using Eq. (1) and Theorem 3.1 to calculate \(Y(m,n+(m-2)\times p)\). The formula is more efficient to use than simply applying Eq. (1) since \(Y_{p(0)}(j,n+(j-2)\times p)\), when \(j=2,\ldots , m-1\), involve smaller integers and therefore are easier to calculate than \(Y_{p(r)}(m,n+(m-2)\times p)\), when \(r=1,\ldots , m-2\).

Theorem 3.5

Let \(m\ge 2\) be an integer. Then, we have

$$\begin{aligned} Y(m,n+(m-2)\times p)= & {} \sum _{j=2}^{m} Y_{p(0)}(j,n+(j-2)\times p)\\&+\sum _{r=m-1}^{\min \left\{ m,\left\lfloor \frac{n+(m-2)\times p}{p}\right\rfloor \right\} } Y_{p(r)}(m,n+(m-2)\times p). \end{aligned}$$

Proof

For \(r=0,\ldots m-2\), by applying Theorem 3.1 we have

$$\begin{aligned} Y_{p(r)}(m,n+(m-2)\times p)= & {} Y_{p(r-1)}(m-1,n+(m-3)\times p)\\= & {} Y_{p(r-2)}(m-2,n+(m-4)\times p)\\= & {} \cdots \\= & {} Y_{p(0)}(m-r,n+(m-r-2)\times p). \end{aligned}$$

Therefore,

$$\begin{aligned} \sum _{r=0}^{m-2} Y_{p(r)}(m,n+(m-2)\times p)=\sum _{j=2}^{m} Y_{p(0)}(j,n+(j-2)\times p). \end{aligned}$$

Since we know that

$$\begin{aligned} Y(m,n+(m-2)\times p)=\sum _{r=0}^{\min \left\{ m,\left\lfloor \frac{n+(m-2)\times p}{p}\right\rfloor \right\} } Y_{p(r)}(m,n+(m-2)\times p), \end{aligned}$$

we get the following equation

$$\begin{aligned} Y(m,n+(m-2)\times p)= & {} \sum _{j=2}^{m} Y_{p(0)}(j,n+(j-2)\times p)\\&+\sum _{r=m-1}^{\min \left\{ m,\left\lfloor \frac{n+(m-2)\times p}{p}\right\rfloor \right\} } Y_{p(r)}(m,n+(m-2)\times p). \end{aligned}$$

\(\square \)

Example 3.2

Let \(m=4,\ n=61,\ p=3\). Since we already know that \(Y_{3(r)}(4,67)=0\) for all \(3\le r\le 4\), applying Theorem 3.5 yields

$$\begin{aligned} Y(4,67)=Y_{3(0)}(2,61)+Y_{3(0)}(3,64)+Y_{3(0)}(4,67)=1+2+18=21. \end{aligned}$$

Corollary 3.6

Let \(m\ge 2\) be an integer. Then, we have

$$\begin{aligned} Y(m,m\times p)=\sum _{j=2}^{m} Y_{p(0)}(j, j\times p)+1. \end{aligned}$$

Proof

Let \(n=2\times p\). Applying Theorem 3.5, we get

$$\begin{aligned} Y(m,m\times p)= & {} \sum _{j=2}^{m} Y_{p(0)}(j, j\times p)+\sum _{r=m-1}^m Y_{p(r)}(m,m\times p)\\= & {} \sum _{j=2}^{m} Y_{p(0)}(j, j\times p)+Y_{p(m-1)}(m,m\times p)+Y_{p(m)}(m,m\times p)\\= & {} \sum _{j=2}^{m} Y_{p(0)}(j, j\times p)+0+1\\= & {} \sum _{j=2}^{m} Y_{p(0)}(j, j\times p)+1. \end{aligned}$$

\(\square \)

Note that in [9], properties regarding Y(mn) where m is a divisor of n are considered. In this paper, we do not have any restrictions on m. Corollaries 3.2 and 3.6 recover the results of Theorem 3.3 and Corollary 3.1 in [9], respectively.

4 Numerical Analysis of General Prime Partition Numbers

In this section, we analyze the general prime partition numbers Y(mn) using the data generated by Mathematica code. The numbers Y(2, n) for even n and Y(3, n) for odd n are called the Goldbach partition numbers. We use Mathematica code to produce the graph of Y(2, n), commonly known as the Goldbach comet, for even \(n\le 100{,}000\) and the graph of Y(3, n) for odd \(n\le 10{,}000\). Figure 1 shows the graph of Y(2, n) on the left and the graph of Y(3, n) on the right. The sequence Y(2, n) or Y(3, n) can be converted into a binary sequence by mapping each odd integer to 1 and each even integer to 0. The resulting binary sequences have applications in cryptography [6]. The estimate in [4] shows that

$$\begin{aligned} Y(2,n)\approx 2 \pi _2 \left( \prod _{p|n;p\ge 3}\frac{p-1}{p-2}\right) \frac{n}{\ln ^2 n}, \end{aligned}$$

where \(\pi _2\) is the twin prime constant

$$\begin{aligned} \prod _{p\ge 3}\left( 1-\frac{1}{(p-1)^2}\right) =0.6601618158 \ldots . \end{aligned}$$

We observe that on the graph of Y(3, n) for odd n, the upper branch corresponds to those \(n\equiv 1 \text { or }2 \text { (mod) }3\) and the lower branch corresponds to those \(n\equiv 0 \text { (mod) }3\).

Fig. 1
figure 1

Goldbach partition numbers Y(2, n) for even \(n\le 100{,}000\) and Y(3, n) for odd \(n\le 10{,}000\)

Fig. 2
figure 2

Graphs of Y(5, n) for \(n\le 1000\) and Y(10, n) for \(n\le 500\)

We use Mathematica code to obtain Y(mn) for \(n\le 1000\) when \(m=4,5,6,7,8\) and Y(mn) for \(n\le 500\) when \(m=9,10\). Figure 2 shows the graph of Y(5, n) on the left and the graph of Y(10, n) on the right. The phenomenon of ramification into two branches occurs in all the graphs of Y(mn) for \(4\le m\le 10\). In the case of m being even, the upper branch corresponds to the case when n is even and the lower branch corresponds to the case when n is odd. In the case of m being odd, the upper branch corresponds to the case when n is odd and the lower branch corresponds to the case when n is even. Our goal is to find an approximation of some analytical formulas for Y(mn) when \(m=4,5,6,7,8,9,10\).

Fig. 3
figure 3

Graphs of \(\ln Y(m,n)\) as a function of \(\ln n\). The graph of n being even is on the left, and the graph of n being odd is on the right

Fig. 4
figure 4

Least square fitting for \(\ln Y(m,n)\) and \(\ln n\). The green lines are for the data, and the red lines are for the fit. (Color figure online)

In the following analysis, we will deal with the case of n being even and the case of n being odd separately. We take the natural logarithm of n and Y(mn) and obtain Fig. 3 with the case of n being even on the left and the case of n being odd on the right. We notice that the graph of \(\ln Y(m,n)\) as a function of \(\ln n\) represents a line. Thus, we conclude that for a fixed m, the function Y(mn) is approximately a power function of n when n is large. We also notice that there are overlaps on the graphs in Fig. 3. The green line is for the smaller m, and the red line is for the larger m. The overlaps are due to the fact that when n and m have different parity, one of the prime parts in a prime partition of n as m parts must be 2; therefore, \(Y(n,m)=Y(n-2,m-1)\). When n grows larger, the differences between \(\ln n\) and \(\ln (n-2)\) become smaller. Finally, we notice that there are some random noises in Fig. 3 when n is even and \(m=5\). The random noises are more significant when \(m=3,4\); thus, we omit the graphs of the cases when \(m=3,4\) in Fig. 3.

Fig. 5
figure 5

Data fitting for Y(mn) and n. The green curves are for the data, and the red curves are for the fit. (Color figure online)

Using the least square methods, we can fit the data of \(\ln Y(m,n)\) and \(\ln n\) by using a straight line. The results are shown in Fig. 4. We can see that the fitted graphs (red lines) and the data graphs (green lines) match very well. Assume we are given an equation of a line

$$\begin{aligned} \ln Y(m,n)=a \ln n +b, \end{aligned}$$

then by taking exponentials we will get a power function

$$\begin{aligned} Y(m,n)=e^b n ^a. \end{aligned}$$

Using the parameters for the fitted lines in Fig. 4, we can get the fitted power functions for the data of Y(mn) and n. The fitting results are shown in Fig. 5. We can see that the fitted curves (in red color) match well with the data curves (in green color). The parameters in the fitted data are listed in Table 1.