TITLE: Does Rademacher's convergent series for p(n) define an analytic function?
QUESTION [22 upvotes]: Let $p(n)$ be the number of partitions of $n\geq 0$. We can let $n$ be
any complex number in Rademacher's convergent infinite series for
$p(n)$. (See e.g. equation (24) here.)
For what $n$ does it converge? Does it define an analytic function for
such $n$? If so, what are the properties of this analytic function
(singularities, branch points, domain of existence, etc.)? This question
asked for an analytic continuation of $p(n)$, so I am suggesting a
possible answer.

REPLY [20 votes]: Not a direct answer to the question, but a brief numerical exploration of this function.
First, a trivial observation: we can write either $e^{\pi i x}$ or $\cos(\pi x)$ in the formula for the exponential sum $A_k(n)$ in the Rademacher series. This makes no difference at integer $n$, but gives different generalizations for noninteger $n$. The cosine version has the nice property of being real-valued on the real line and conjugate symmetric.
Here is a plot of the cosine-extended $p(n)$ on the real line:

The exponential version (real and imaginary parts):

Either version of the function seems to have simple zeros at the negative integers $-1, -2, -3, ...$. (This is quite nice if correct, because it matches the obvious combinatorial interpretation $p(-n) = 0$.) The cosine version has additional zeros on the negative real line (the first near $-0.93$).
At half-integers, it appears that all terms in the cosine version of the Rademacher series except the first term vanish, and so one has a trivial closed-form evaluation of $p(k+\tfrac{1}{2})$, $k \in \mathbb{Z}$. This is not the case for the exponential version.
Taking this leading term as a cue for the asymptotics on the real line, the origin is a turning point between exponential growth to the right and $\text{oscillation} \cdot O(n^{-1})$ behavior to the left.
Viewed in the imaginary direction, the exponential version appears to grow exponentially as $n \to +i \infty$ but remains small as $n \to -i \infty$. Plot of the real and imaginary parts of $p(i x)$:

The cosine version looks like the upper-half-plane exponential version:

There are additional zeros in complex plane. Since the Rademacher series converges slowly when the imaginary part of $n$ is large, it's a bit difficult to explore these zeros numerically. Here is a low-resolution plot of the exponential version of $p(z)$ on $z \in [-4,4] + [-2,2] i$:

And the cosine version:

The slow convergence also makes it difficult to search numerically for other potential closed forms (it is expensive to get more than ~6 digits). A faster algorithm for computing $p(n)$ to high precision near the origin would be very exciting.
Unoptimized Python implementation that I used to create these plots: https://gist.github.com/fredrik-johansson/7c2711887811ef9f2d7038b8451a4e63