---
title: Merca's Partition Functions
url: https://www.emergentmind.com/topics/merca-s-partition-function
type: topic
---

# Merca's Partition Functions

Merca's partition function is not a single universally fixed sequence in the literature. The expression is used for several inequivalent partition-theoretic objects introduced by Mircea Merca or studied in direct connection with his work: the refined count \(p(k,n)\) of partitions using exactly \(k\) different magnitudes, the signed cubic-partition function \(A(n)\), the restricted-partition function \(a(n)\) for partitions in which every odd part has multiplicity at most \(2\), weighted sum-of-parts statistics such as \(a_{m,r}(n)\) and \(S_m(n)\), and further arithmetic or theta-series variants built from partition generating functions [1806.05416][2208.11249][2509.09833][2303.06764][2310.19098][2411.13818].

## 1. Terminological scope in the literature

The term is best understood as a family label rather than a single notation. Different papers attach it to different partition statistics, often with distinct combinatorial content and distinct generating functions.

| Notation | Meaning | Representative source |
|---|---|---|
| \(p(k,n)\) | partitions of \(n\) using exactly \(k\) different magnitudes | [1806.05416] |
| \(A(n)\) | \(E(n)-O(n)\) for cubic partitions | [2208.11249] |
| \(a(n)\) | partitions with every odd part of multiplicity at most \(2\); equivalently no part \(\equiv 3 \pmod 6\) | [2509.09833] |
| \(a_{m,r}(n)\) | sum of distinct parts \(\equiv r \pmod m\) in all partitions of \(n\) | [2303.06764] |
| \(S_m(n)\) | sum of distinct parts appearing at least \(m\) times in partitions of \(n\) | [2303.06764] |
| \(S_k(n)\), \(S_k^{\ge r}(n)\) | number of \(k\)'s in all partitions, with or without a smallest-part restriction | [2310.19098] |
| \(a_k(n)\), \(a_{k,p}(n)\), \(b_k(n)\) | divisibility and multiplicity refinements of Merca-Yee statistics | [2111.10587] |
| \(a_{r,s}(n)\), \(P_{R,S}(n)\) | partitions with parts in residue classes \(\pm s \pmod r\) or \(\pm S,0 \pmod R\) | [2411.13818] |

A recurrent source of confusion is notation reuse. The symbol \(a(n)\) denotes two unrelated objects in different parts of the literature: a restricted partition-counting function in the parity paper of Zanello [2509.09833], and, in the Merca-Yee setting, the sum of all distinct parts across all partitions of \(n\), together with its refinements \(a_k(n)\) and \(a_{k,p}(n)\) [2111.10587].

## 2. Partitions with exactly \(k\) different magnitudes

One major meaning of Merca's partition function is \(p(k,n)\), the number of partitions of \(n\) that use exactly \(k\) different values for the parts. In the same framework, \(q(k,n)\) denotes the number of partitions of \(n\) into exactly \(k\) distinct parts. Merca's formula expresses \(p(k,n)\) as
\[
p(k,n)=\sum_{m=\binom{k+1}{2}}^{n} a(k,m)\,p(n-m),
\qquad
a(k,m)=\sum_{j=k}^{\infty}(-1)^{j-k}\binom{j}{k}q(j,m),
\]
and uses the classical relation
\[
q(k,n)=p_k\!\left(n-\binom{k+1}{2}\right),
\]
where \(p_k(n)\) is the number of partitions of \(n\) with largest part \(\le k\) [1806.05416].

Hussein proved that this refined function simplifies sharply after a triangular-number shift. For integers \(k,n\ge 0\) with \(k\ge n\),
\[
p\!\left(k,n+\binom{k+1}{2}\right)=\sum_{m=0}^{n}p(m)p(n-m).
\]
The right-hand side is the self-convolution of the ordinary partition function, equivalently the number of partitions of \(n\) into parts of two kinds. In this regime the shifted value of \(p(k,n)\) is therefore independent of \(k\) and is governed by a classical convolution sequence rather than by a new \(k\)-dependent statistic [1806.05416].

The same paper supplies both an analytic derivation and a direct combinatorial proof. The combinatorial argument is built around the base partition \(1+2+\cdots+k=\binom{k+1}{2}\), which explains why the triangular shift is intrinsic rather than incidental. This is one of the clearest examples in Merca's work where a refined partition statistic collapses, after a canonical shift, to a standard object from classical partition theory [1806.05416].

## 3. The signed cubic-partition function \(A(n)\)

A second major usage is the function \(A(n)\) associated with cubic partitions. A cubic partition of \(n\) is an ordinary partition in which even parts may appear in two different colors, while odd parts have only one color. If \(E(n)\) and \(O(n)\) denote the numbers of cubic partitions of \(n\) into an even and an odd number of parts, respectively, then
\[
A(n):=E(n)-O(n).
\]
Its generating function is
\[
\sum_{n=0}^{\infty}A(n)q^n=(q;q^2)_\infty (q^2;q^4)_\infty=\frac{f_1f_4}{f_2^2},
\]
with the standard shorthand \(f_b=(q^b;q^b)_\infty\) [2208.11249].

Merca proved the Ramanujan-like congruences
\[
A(9n+5)\equiv 0 \pmod 3,
\qquad
A(27n+26)\equiv 0 \pmod 3
\]
for all \(n\ge 0\). Da Silva and Sellers gave elementary proofs of these congruences using classical generating-function manipulations and \(3\)-dissections, and extended them to two infinite families of non-nested Ramanujan-like congruences modulo \(3\). A crucial intermediate relation is the internal congruence
\[
A(27n+8)\equiv A(3n+1)\pmod 3,
\]
which drives the inductive construction of the infinite families [2208.11249].

Methodologically, this function occupies an instructive middle ground between combinatorics and modularity. Merca's original proofs used modular forms together with Smoot's Mathematica implementation of Radu's algorithm, whereas da Silva and Sellers avoided modular forms entirely and worked only with classical \(q\)-series identities, Ramanujan's theta functions, and \(3\)-dissections. The underlying arithmetic behavior is therefore modular-form-like, but the proofs can be made completely elementary at the level of formal series manipulations [2208.11249].

## 4. The restricted partition-counting function \(a(n)\)

Another function explicitly called Merca's partition function is the sequence \(a(n)\) counting partitions of \(n\) in which no part is congruent to \(3 \pmod 6\). Merca also showed that this is equivalent to counting partitions of \(n\) in which every odd part appears with multiplicity at most \(2\). Its generating function is
\[
\sum_{n\ge 0} a(n)q^n=\frac{f_3(q)}{f_1(q)f_6(q)}.
\]
Modulo \(2\), the identity \(f_6(q)\equiv_2 f_3(q)^2\) gives
\[
\sum_{n\ge 0} a(n)q^n \equiv_2 \frac{1}{f_1(q)f_3(q)}.
\]
This reduction is the basis of several short parity proofs [2509.09833].

The central congruences are
\[
a(4m+2)\equiv 0 \pmod 2,
\qquad
a(4m+3)\equiv 0 \pmod 2
\]
for all \(m\ge 0\). Zanello supplied three very short new proofs of these congruences, all via classical \(q\)-series identities modulo \(2\). The arguments use, in different ways, Euler's pentagonal number theorem modulo \(2\), identities related to \(3\)-core partitions, and a binary \(q\)-series identity that decomposes \((f_1f_3)^{-1}\) into components supported only in residue classes \(0\) and \(1 \pmod 4\) [2509.09833].

The same paper places \(a(n)\) into the eta-quotient framework:
\[
\sum_{n\ge 0} a(n)q^n
=
q^{1/4}\,\frac{\eta(3\tau)}{\eta(\tau)\eta(6\tau)},
\]
an eta-quotient of weight \(-\tfrac12\). It also reports extensive computational evidence that \(a(n)\) is odd with natural density \(1/4\), and formulates the corresponding parity problem in terms of equidistribution modulo \(2\) for related eta-quotients. This gives the function a dual status: combinatorially it is a restriction on odd-part multiplicities, while analytically it is a negative-weight eta-quotient with rigid parity support on two residue classes modulo \(4\) [2509.09833].

## 5. Weighted sum-of-parts functions and their refinements

Merca also introduced weighted partition statistics that sum parts across all partitions rather than count partitions individually. For integers \(0<r<m\), \(a_{m,r}(n)\) is the sum of all distinct parts congruent to \(r \pmod m\) in all partitions of \(n\), and \(S_m(n)\) is the sum of distinct parts that appear at least \(m\) times in partitions of \(n\). Their baseline identities are
\[
a_{m,r}(n)=\sum_{j=0}^{\infty}(mj+r)\,p(n-mj-r),
\qquad
S_m(n)=\sum_{j=0}^{\infty}j\,p(n-mj),
\]
with generating functions
\[
\sum_{n\ge0} a_{m,r}(n)q^n
=
\frac{\sum_{j\ge0}(mj+r)q^{mj+r}}{(q;q)_\infty},
\qquad
\sum_{n\ge0} S_m(n)q^n
=
\frac{\sum_{j\ge0} jq^{mj}}{(q;q)_\infty}.
\]
Merca's results, and the later combinatorial proofs of Ali, Das, and Dey, connect these functions to parity-refined partition counts, distinct odd partitions, PED partitions, Dyson rank, Garden of Eden partitions, Andrews-Garvan crank, and the minimal excludant through a large web of involutive identities [2303.06764].

Mahanta and Saikia refined the Merca-Yee statistics further. For fixed \(k\), \(a_k(n)\) is the sum of the distinct parts divisible by \(k\) in all partitions of \(n\); \(a_{k,p}(n)\) is the sum of distinct parts congruent to \(p \pmod k\); and \(b_k(n)\) is the sum of distinct parts that appear at least \(k\) times. Their generating functions are
\[
\sum_{n=1}^{\infty} a_k(n) q^n
=
\frac{k q^k}{(q;q)_\infty (1-q^k)^2},
\]
\[
\sum_{n=1}^{\infty} a_{k,p}(n) q^n
=
\frac{(p q^{p-k} + (k-p) q^p) q^k}{(q;q)_\infty (1-q^k)^2},
\]
\[
\sum_{n=1}^{\infty} b_k(n) q^n
=
\frac{q^k}{(q;q)_\infty (1-q^k)^2},
\]
and they satisfy
\[
a_k(n)=k\,b_k(n),
\qquad
a_{k,p}(n)=(k-p)\,b_k(n-p)+p\,b_k(n+k-p).
\]
These results generalize Merca-Yee's identities for \(a(n)\), \(b(n)\), \(d_e(n)=a_{2,0}(n)\), and \(a_o(n)=a_{2,1}(n)\), and link \(b_k(n)\) to the Andrews-Merca partition functions \(M_\ell(n)\) and \(MP_\ell(n)\) arising from truncated pentagonal and theta identities [2111.10587].

This branch of the literature also contains an explicit correction: Mahanta and Saikia note that in a Merca-Yee theta-type identity the exponent of \(-1\) should be \(j(j+1)/2\), not \(j\). The correction matters because the sign pattern must match the truncated Gauss identity that underlies the appearance of \(MP_\ell(n)\) [2111.10587].

## 6. Arithmetic identities, rooted partitions, and theta-series extensions

A separate line of work relates partition statistics of Merca type to classical arithmetic functions. Let \(S_k(n)\) be the total number of \(k\)'s in all partitions of \(n\), and let \(S_k^{\ge r}(n)\) denote the same count restricted to partitions whose smallest part is at least \(r\). Merca and Schmidt proved the identities
\[
S_1(n)=\sum_{k=2}^{n+1}\varphi(k)\,S_k^{\ge 2}(n+1),
\]
\[
p(n)=\sum_{k=3}^{n+3}\varphi(k)\,S_k^{\ge 3}(n+3),
\]
\[
p(n)=\sum_{k=1}^{n+1}\mu(k)\,S_k(n+1),
\]
\[
p(n)= -\sum_{k=2}^{n+2}\mu(k)\,S_k^{\ge 2}(n+2).
\]
Sagan gave bijective and sign-reversing-involution proofs of these formulas by introducing rooted partitions and a direct-sum operation. In this framework, a rooted partition records a distinguished occurrence of a part, so that \(S_k(n)\) becomes a cardinality statement about rooted partitions with root \(k\); the functions \(\varphi\) and \(\mu\) then arise from explicit coprimality data and prime-factor sign changes in the rooted block [2310.19098].

Merca's work also extends to partition-type convolution sequences involving the sum of odd divisors and generalized polygonal numbers. Lakein and Larsen study the sequences
\[
S_m(n)=\sum_{k=-\infty}^{\infty}\sigma_{\mathrm{odd}}(n-P_m(k)),
\qquad
T(n)=\sum_{k=-\infty}^{\infty}(-1)^{P_3(-k)}\sigma_{\mathrm{odd}}(n-P_5(k)),
\]
which arise as coefficients of products of \(\sum_{n\ge1}\sigma_{\mathrm{odd}}(n)q^n\) with polygonal theta series. They proved Merca's three conjectures and identified exactly which moduli \(m\) make the corresponding congruences valid for all \(n\): \(m\in\{5,6\}\) in the parity case, \(m\in\{2,3,6\}\) for one pentagonal congruence, and \(m\in\{2,4\}\) for the signed pentagonal congruence [2107.07637].

In the truncated Jacobi triple product literature, Merca's stronger conjecture leads to further partition functions. The product
\[
\frac{1}{(q^s,q^{r-s};q^r)_\infty}
=
\sum_{n\ge0} a_{r,s}(n)q^n
\]
counts partitions into parts congruent to \(\pm s \pmod r\), while
\[
\frac{1}{(q^S,q^{R-S},q^R;q^R)_\infty}
\]
counts partitions whose parts are congruent to \(\pm S\) or \(0 \pmod R\). Ding and Sun proved Merca's stronger conjecture for sufficiently large \(n\), provided an effective procedure for computing a threshold \(N(r,s,k)\), and showed that for sufficiently large \(k\) the conjecture holds for all \(n\ge0\) [2411.13818].

## 7. Methods, structure, and significance

Across these meanings, Merca's partition functions are studied through a characteristic mix of \(q\)-series, combinatorics, and arithmetic. The cubic-partition function \(A(n)\) admits both modular-form proofs via eta-quotients and Radu's algorithm and elementary proofs via Ramanujan theta functions and \(3\)-dissections [2208.11249]. The restricted function \(a(n)\) is analyzed through eta-quotients, binary \(q\)-series identities, and parity decompositions modulo \(2\) [2509.09833]. The weighted functions \(a_{m,r}(n)\) and \(S_m(n)\) are connected to classical involutions of Andrews, Gupta, Bressoud-Zeilberger, and Hopkins-Sellers, which translate analytic identities into rank, crank, mex, and Garden-of-Eden combinatorics [2303.06764]. The arithmetic formulas involving \(\varphi\) and \(\mu\) become bijective once rooted partitions and direct sums are introduced [2310.19098]. The theta-series extensions associated with Merca's stronger conjecture require a different toolkit: finite polynomial-periodic decompositions for restricted partition functions, the circle method, and asymptotic bounds for nonmodular infinite products [2411.13818].

The resulting landscape is structurally coherent even though the notations are not. Several themes recur. One is refinement: ordinary partitions are filtered by number of magnitudes, congruence class, multiplicity threshold, residue class of parts, or parity of number of parts. Another is shift and truncation: triangular shifts turn \(p(k,n)\) into a self-convolution of \(p(n)\), truncated pentagonal and theta identities produce the functions \(M_\ell(n)\) and \(MP_\ell(n)\), and truncated Jacobi triple products act on residue-restricted partition functions [1806.05416][2111.10587][2411.13818]. A third is arithmetic rigidity: congruences such as
\[
A(9n+5)\equiv A(27n+26)\equiv 0 \pmod 3
\]
and
\[
a(4m+2)\equiv a(4m+3)\equiv 0 \pmod 2
\]
show that very different partition models can display Ramanujan-like behavior on specific progressions [2208.11249][2509.09833].

The literature therefore does not support a single canonical definition of Merca's partition function. It supports, instead, a cluster of partition and partition-type functions characterized by refined combinatorial input and unexpectedly rigid analytic output. This suggests that the most accurate encyclopedic treatment is not to isolate one notation, but to recognize a distinct Merca strand in contemporary partition theory: one in which weighted partition statistics, congruence-restricted generating functions, truncated theta phenomena, and arithmetic identities are repeatedly brought into the same formal framework.

Source: https://www.emergentmind.com/topics/merca-s-partition-function