Number of integer partitions

521 Views Asked by At

Let's $N$ be a positive integer and $P$ - set of all possible partitions of the $N$, where $p = (a_1,a_2,...,a_n)$ with $a_1\le a_2 \le ... \le a_n$ and $a_1+a_2+...+a_n = N$. Let's $A$ be the number of partitions $p \in P: \dfrac{\max\{p\}}{\min\{p\}}<2$. How do I find the $A$?

Input: $N \in \Bbb N$. Output: $A$ - the number of partitions $p \in P: \dfrac{\max\{p\}}{\min\{p\}}<2$.

I think that this problem can be solved by a dynamic-based algorithm, but I didn't figure it out. Thanks in advance for your reply.

1

There are 1 best solutions below

3
On BEST ANSWER

Ends up this $A(n)$ sequence is very interesting: it gives the coefficients of the 5th order mock theta function $\chi_1(q)$ from Ramanujan's "lost" notebook. See the Online Encyclopedia of Integer Sequences link http://oeis.org/A053263 for the generating function, equivalent partition interpretations, references, etc.