# Closed form for partition function with sinh

Define $$\left( \left( x \right) \right)= \left\{ \begin{array}{ll} x - \lfloor x \rfloor - \dfrac{1}{2} &, \quad x \not\in\mathbb{Z} \\ 0 , \quad x \in \mathbb{Z}, \end{array} \right.$$ a sawtooth function, define $$s(h,k)=\displaystyle\sum_{j=1}^{k-1} \dfrac{j}{k} \left( \left( \dfrac{hj}{k} \right) \right),$$ and define $$A_k(n)=\displaystyle\sum_{0<h<k, (h,k)=1} \exp \left( \pi i s(h,k) - \dfrac{2 \pi i h n}{k} \right).$$ Then, taking $p(0)=1$, the following formula holds: $$p(n)=\dfrac{1}{\pi \sqrt{2}} \displaystyle\sum_{k=1}^{\infty} \sqrt{k}A_k(n) \dfrac{\mathrm{d}}{\mathrm{d}n} \left[ \dfrac{\sinh \left( \dfrac{\pi}{k} \sqrt{\dfrac{2}{3}} \sqrt{n-\dfrac{1}{24}} \right)}{\sqrt{n-\dfrac{1}{24}}} \right],$$ where $p$ denotes the partition function, $\pi$ denotes pi, and $\sinh$ denotes the hyperbolic sine.