Monthly Archives: March 2012

Partitions into the quintillions

One of my biggest undertakings last year was to implement the partition function $p(n)$ in FLINT. With this code, I was able to set a record by computing the number of partitions of $10^{19}$, or 10,000,000,000,000,000,000 (ten quintillion). The number … Continue reading

Posted in flint, partitions, sage | Comments Off

Factorials mod n and Wilson’s theorem

Wilson’s theorem states that an integer greater than 1 is a prime if and only if $(n-1)! \equiv -1 \bmod n$. This immediately gives a simple algorithm to test primality of an integer: just multiply out \$1 \times 2 \times … Continue reading

Posted in flint, math, Uncategorized | Comments Off