In "Integer partitions" by Andrews and Eriksson, the authors provide formulas to compute $p(n,m)$, i.e., the number of partitions of $n$ into parts less than or equal to $m$, for $m=1,2,3,4,5$. As discussed in this question, it seems that no formula for $m>5$ is known. Howevere, the fact that $p(n,m)$ for $m\leq 5$ are upper-bounded by polynomials, made me naturally wonder whether this holds for $m>5$ or not. This is also related to the result in Section 6.4, in which the authors show that $p(n)$ is sub-exponential.
4 Answers
We can always write $p_m(n)$ as a sum of quasi-polynomials in $n$ for fixed $m$, e.g., $$ p_2(n)=\lfloor \frac{n}{2}+\frac{3}{4}\rfloor + [-\frac{1}{4},\frac{1}{4}], $$ see the article Formulae for the number of partitions of n into at most m parts, by A.V. Sills and D. Zeilberger.
- 140,055
Via Flajolet-Sedgewick: $p_m(z)=\frac{1}{\left(1-z\right) \left(1-z^2\right)\text{...} \left(1-z^m\right)}$ is an ordinary generating function. For general k, the coefficients are "polynom + some small (O(1)) periodic function". Using Mathematica,
$$ p(n,5) = \frac{30 n \left(15 \left(3 (-1)^n+85\right)+n (n (n+30)+310)\right)+10125 (-1)^n+5400 \sin \left(\frac{\pi n}{2}\right)+5400 \cos \left(\frac{\pi n}{2}\right)+6400 \cos \left(\frac{2 \pi n}{3}\right)+6912 \cos \left(\frac{2 \pi n}{5}\right)+6912 \cos \left(\frac{4 \pi n}{5}\right)+50651}{86400}$$
and for k=6
$$ \frac{(2 n+21) (2 n (n+21) (3 n (n+21)+434)+28511)}{1036800}+\frac{1}{32} \sin \left(\frac{\pi n}{2}\right)+\frac{i (6 n (n+21)+581) \sin (\pi n)}{4608}+\frac{1}{25} \sqrt{1+\frac{2}{\sqrt{5}}} \sin \left(\frac{2 \pi n}{5}\right)+\frac{1}{25} \sqrt{1-\frac{2}{\sqrt{5}}} \sin \left(\frac{4 \pi n}{5}\right)+\frac{\sin \left(\frac{2 \pi n}{3}\right)}{81 \sqrt{3}}+\frac{1}{32} \cos \left(\frac{\pi n}{2}\right)+\frac{1}{18} \cos \left(\frac{\pi n}{3}\right)+\frac{1}{162} (2 n+21) \cos \left(\frac{2 \pi n}{3}\right)+\frac{1}{25} \cos \left(\frac{2 \pi n}{5}\right)+\frac{1}{25} \cos \left(\frac{4 \pi n}{5}\right)+\frac{(6 n (n+21)+581) \cos (\pi n)}{4608} $$
- 1,017
Lets try $m = 2$. We have by definition $$1 + \sum_{n = 1}^{\infty}p(n, m)q^{n} = \frac{1}{(1 - q)(1 - q^{2})\cdots(1 - q^{m})}\tag{1}$$ Setting $m = 2$ we get the RHS as $$\frac{1}{(1 - q)(1 - q^{2})} = \frac{1}{(1 - q)^{2}(1 + q)} = \frac{A}{1 + q} + \frac{B}{1 - q} + \frac{C}{(1 - q)^{2}}$$ and $A = 1/4, B = 1/4, C = 1/2$ and hence $$\frac{1}{(1 - q)(1 - q^{2})} = \frac{1}{4}\sum_{n = 0}^{\infty}(-1)^{n}q^{n} + \frac{1}{4}\sum_{n = 0}^{\infty}q^{n} + \frac{1}{2}\sum_{n = 0}^{\infty}(n + 1)q^{n}$$ and hence we can see that $$p(n, 2) = \frac{2n + 3 + (-1)^{n}}{4}$$ The process can be carried out in theory for any positive integer $m$ but this requires the use of roots of unity (for factoring $(1 - q^{i})$ and then using partial fractions) and the results will be very complicated even for slightly larger values of $m$.
It is easy to see that in general we will have one partial fraction of the form $1/(1 - q)^{m}$ and from this we get the coefficient of type $m(m + 1)\cdots(m - n + 1)/n!$ and this (together with a rational coefficient) becomes the leading term in expression for $p(n, m)$. Thus for the $m = 6$ we have the leading term as $A(n + 1)(n + 2)(n + 3)(n + 4)(n + 5)$ where $A$ is rational.
- 92,128
The explicit expressions for the number of partitions p(s,m) of s into parts less than or equal to m,
x_1+2 x_2+...+m x_m=s,
for m≤12 is given in "Sylvester Waves in the Coxeter Groups", Ramanujan J., 6, 307–329, 2002.
Much more difficult problem for the number of partitions W(s; d^m) of s into m positive integers, d^m={d_1,...d_m)
d_1 x_1+d_2 x_2+...+d_m x_m=s,
is solved in "Restricted partition functions as Bernoulli and Eulerian polynomials of higher order", Ramanujan J., 11, 331–347, 2006. Formula for W(s; d^m) makes use of designations from umbral calculus, but is explicit and computable.
a(n) = floor((2 +3*(floor(n/3) +floor(-n/3))) *(floor(n/3)+1)/54 +(6*n^5 +315*n^4 +6160*n^3 +55125*n^2 +219905*n +485700)/518400 +(n+1) *(n+20) *(-1)^n/768). - Tani Akinariwhich is not quite polynomial – Henry Apr 21 '17 at 09:02