[Rademacher’s formula](https://en.m.wikipedia.org/wiki/Partition_function_(number_theory)) for the partition function allows fast computation using high precision arithmetic, but requiring a lot of memory. [Here](https://fredrikj.net/blog/2014/03/new-partition-function-record) is an example computation of $p(10^{20})$ by Fredrik Johansson.


**Question:** Is there a $p$-adic or modular analogue that allows fast computation modulo an arbitrary small prime, with low memory (related only to the size of the prime)?



Fast computation of the partition function modulo a prime
To the best of my knowledge, there is no known method to compute $p(n)$ modulo a small prime using less than $n^{1/2+o(1)}$ time or memory, except for those cases where a Ramanujan-like congruence applies.


