I am curious, what kind of exact formulas exist for the partition function $p(n)$?

I seem to remember an exact formula along the lines $p(n) = \sum_k f(n, k)$, where $f(n, k)$ was some extremely messy transcendental function, and the approximation was so good that for large $n$ one could simply take the $k = 1$ term and truncate this to the nearest integer to get an exact formula.

Reviewing the literature, it seems that I misremembered Rademacher's exact formula, which is of the above type but which requires more than one term. I am curious if there are other exact formulas, particularly of the type I mentioned?

Also, if I am indeed wrong and no such formula has been proved, is some good reason why it would be naive to expect one?


  • 3
    $\begingroup$ Take a look at mathworld.wolfram.com/PartitionFunctionP.html $\endgroup$
    – user37691
    Nov 28, 2010 at 21:10
  • 1
    $\begingroup$ Whenever one encounters a strange function, the first step that should be taken is to check DLMF: dlmf.nist.gov/27.14.iii ; Abramowitz and Stegun: people.math.sfu.ca/~cbm/aands/page_825.htm ; and to a lesser extent the Wolfram Functions site: functions.wolfram.com/IntegerFunctions/PartitionsP (most of the other sites take their formulae from these three anyway :P). $\endgroup$ Nov 28, 2010 at 23:07
  • 1
    $\begingroup$ Hi Daniel, thanks for the link. The stuff there is approximately what I knew and/or was able to find before asking my question. Of course, that might be some indication that there's not too much more out there related to my question. $\endgroup$ Nov 28, 2010 at 23:08
  • 2
    $\begingroup$ The paper "An arithmetic formula for the partition function" (math.wisc.edu/~ono/reprints/097.pdf) by Bringmann and Ono gives an alternative exact formula for the partition function, in terms of the twisted trace of a Poincare series. The authors call it an "arithmetic reformulation" of Rademacher's formula, so it probably doesn't approximate p(n) any better, but it may be a helpful alternative perspective. $\endgroup$ Nov 29, 2010 at 20:25
  • $\begingroup$ In case anyone else is confused in the way I was upon reading this question: it does not refer to the "partition function" used in statistical mechanics or probabilistic inference. $\endgroup$
    – Noah Stein
    Apr 16, 2013 at 12:32

4 Answers 4


This doesn't really answer the question, so perhaps it would be better as a comment, but alas, I don't have the necessary reputation.

Following up on Thomas Bloom's reference to the work of Bringmann and Ono, there is a paper of Folsom and Masri (Mathematische Annalen, available here: http://www.math.yale.edu/~alf8/Folsom-Masri-MathAnn07-10.pdf) which considers the main term one would get in an asymptotic formula arising from BO's Poincare series formula. In particular, they also consider the problem of the error arising from truncating the infinite sum at $O(n^{1/2})$, obtaining power savings over the best known results of $O(n^{-1/2+\epsilon})$ if one truncates at $\lfloor \sqrt{n/6} \rfloor$.

  • $\begingroup$ Based on reading this, various other papers, and all the comments above (and knowing Amanda Folsom and Riad Masri, and trusting that their paper represents the current state of knowledge), I'm guessing that Rademacher's formula is "the best". This paper is really cool -- it describes good bounds on the error terms in Rademacher's paper, as well as an interesting alternative formulation in terms of Heegner points. $\endgroup$ Dec 1, 2010 at 0:55

I'm not sure whether this should be a comment or an answer: it is curiously missing from all the links above that the generating function for integer partitions satisfies a reasonably nice (order four, homogeneous of degree four) algebraic differential equation:

$$\begin{multline*} 4F^3 F'' + 5x F^3 F''' + x^2 F^3 F^{(\rm iv)} - 16F^2 F'^2 - 15x F^2 F' F'' + 20x^2 F^2 F' F'''\\ - 39x^2 F^2 F''^2 + 10x F F'^3 + 12x^2 F F'^2 F'' + 6x^2 F'^4 = 0 \end{multline*}$$

There is actually also an order three differential equation, but it's not as nice.

According to Don Zagier [The 1-2-3 of modular forms, Section 5.1, Proposition 15] already Ramanujan knew that every modular and every quasi-modular form on $\Gamma_1$ satisfies a third order algebraic differential equation. The equation above is found given the first 39 terms by

guessADE([partition n for n in 0..39], homogeneous==4) 

from FriCAS in less than 0.01 seconds.

  • $\begingroup$ Could you maybe elaborate on "reasonably"? :) Also, did you derive this yourself? $\endgroup$ Nov 29, 2010 at 20:13
  • $\begingroup$ Let me second J.M.'s request, can you please elaborate? $\endgroup$
    – Balazs
    Nov 29, 2010 at 22:31
  • 2
    $\begingroup$ I'm not sure what you mean with 'elaborate on "reasonably nice"'. I think that the equation above is surprisingly simple, the coefficient polynomials have degree at most 3 and the integers occurring are really really small. Compare this with the order differential equation for $1+2\sum z^{n^2}$, which has maximal degree (as polynomial in the generating function and its derivatives) 14 and something like 15 monomials. $\endgroup$ Nov 30, 2010 at 8:24
  • $\begingroup$ I used my own PARI/GP code to find that if $D(f(x)) := x\,f'(x)$ and $f = f(x):=F(x^{24})/x,$ $ f_1=D(f), $ $f_2=D(f_1),$ $f_3=D(f_2),$ $f_4=D(f_3),$ then $6 f_1^4 +12 f_2 f_1^2 f - 39f_2^2 f^2 +20 f_3 f_1 f^2 +f_4f^3 =0.$ $\endgroup$
    – Somos
    Feb 16, 2019 at 22:23

Jan Bruinier and Ken Ono just announced this.

  • $\begingroup$ Very nice. Bit of a shame it doesn't have any references. $\endgroup$ Jan 20, 2011 at 23:51
  • $\begingroup$ Well, or any proofs... but I suppose the real version will come later. $\endgroup$ Jan 21, 2011 at 2:51
  • $\begingroup$ Ooh, that seems very cool. $\endgroup$
    – Simon Rose
    Mar 11, 2011 at 18:34
  • $\begingroup$ Three years after, the link is not working. Is there a place where I can find this paper? $\endgroup$
    – Joël
    May 21, 2014 at 12:59
  • $\begingroup$ @Joël, maybe aimath.org/news/partition works. $\endgroup$ May 21, 2014 at 13:17

In answer to "What kind of exact formulas exist for the partition function", see http://arxiv.org/abs/1103.1585, eqs.(10), (11), and (12).

  • 1
    $\begingroup$ Self-promotion. $\endgroup$ Jun 26, 2013 at 7:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.