A paper with its own helper code
Sagebrush
In this preview: this document is a folder: paper.tex and, beside it, helper.py, which holds its longer code. The SageTeX blocks import it like any Python module, because a document’s code runs in the document’s own folder, as sage paper.sagetex.sage does. Download or share it with its files, and the helper comes along.

Pell’s equation

Fermat’s challenge: the smallest solution of x2−61y2=1x^2 - 61y^2 = 1 in positive integers is (x,y)=(1766319049,226153980)(x, y) = {\left(1766319049, 226153980\right)}, and the next is (6239765965720528801,798920165762330040){\left(6239765965720528801, 798920165762330040\right)}. Check: x2−61y2=1x^2 - 61 y^2 = {1}.

Collatz

Of the starting values below 10001000, the one taking the most steps to reach 11 is n=871n = {871}, after 178{178} steps.