Dr Max Grossmann

Calculating Sophomore’s dream in 2026 (25 million digits!)

Posted: 2026-09-13 · Last updated: 2026-09-12 ·

Sophomore’s dream is a mathematical constant defined by

$$ S = \sum_{n = 1}^{\infty} n^{-n}. $$

The series converges to 1.291285997…

I hold the (unaccredited) world record for computing the most decimal digits of $S$. As of September 2026, I have computed 25,000,000 decimal digits of $S$, thereby dwarfing my previous world records of 200,000 decimal digits (2013) and 1,000,000 digits (2017).

In 2026, with help from coding agents, I was finally able to implement a simple improved algorithm that I had thought about for a long time, but did not have the time to work on myself. The new algorithm is able to confirm my previous world record, 1 million digits, in about 4 minutes on my Framework laptop compared to about 10 days for my old naïve algorithm. The new 25 million digit computation took about 1,200 CPU-hours on a Fedora server. I separately verified the result on my Framework laptop.

The new algorithm exploits the commutativity and associativity of addition to place each individual term

$$ t_n = \left\lfloor \frac{10^D}{n^n} \right\rfloor $$

on leaves in a tree, and then reduce that tree bottom-up, merging pairs of partial sums at each level until a single total remains. Commutativity allows the workers to grab terms in any order; associativity allows the tree to regroup partial sums freely. Here’s a visualization:

stride=4 stride=2 stride=1 p[0] p[0] p[4] p[0] p[2] p[4] p[6] p[0] p[1] p[2] p[3] p[4] p[5] p[6] p[7] workers result terms grabbed dynamically from shuffled work queue

Each $\mathrel{+}=$ folds the right child into the left, in-place.

Each term $t_n$ is computed using GMP’s integer exponentiation and truncation division. With $D$ working digits and $N$ terms satisfying $N^N \ge 10^D$, the integer sum $A = \sum_{n=1}^{N} t_n$ gives a lower approximation $A/10^D$ to $S$. The combined error from per-term flooring and the omitted tail is less than $N10^{-D}$.

I computed 25,002,000 digits on a Fedora server, including 2,000 guard digits; the above output files are truncated to 25,000,000 correct digits. The verification on my Framework laptop under Debian computed 25,001,000 digits and confirms the result. The untruncated raw output is available here.