Experimental mathematical games, simulations, and apps written (or supervised) over the years. Most of the older ones are Java applets that no longer run in modern browsers; this page tracks which have been ported to modern JavaScript, which still run elsewhere, and which are yet to be ported.
Number theory
OriginalEnter a top row — the primes, prime gaps, a single spike, or various random models — and watch the triangular array of successive absolute differences build up, with parity or magnitude colouring, a live check of Gilbreath's conjecture on the left diagonal, and a zoomed-out canvas view for large arrays. A companion to the paper on Gilbreath's conjecture by Zachary Chase, Zach Hunter and Terence Tao.
OriginalA companion to the Gilbreath array explorer. For an exponential-random top row, the decay constant c_n = E a(n,j) is the expected entry at depth n. Set the depth, then watch a Monte-Carlo estimate — the running average of the left diagonal a(n,0) over many random pyramids — converge, plotted against the exactly known c_0…c_6 and Michael Ross's empirical digit-sum law c_n ≈ C·λ^{s₂(n)}/n, with a live sample pyramid alongside. Built on the paper by Zachary Chase, Zach Hunter and Terence Tao; the exact c_4–c_6 and the digit-sum law are due to M. M. Ross.
OriginalWatch a random natural number Z_s with the zeta distribution get built prime by prime: each prime carries a stack of independent exponential "clocks", and the exponent of p in Z_s is how many of its leading clocks beat a threshold s. Slide s down a log-scaled axis and Z_s traces a divisibility chain that jumps by whole prime powers (so it can leap over numbers); run fresh instantiations to watch the distribution of Z_s and the von Mangoldt hitting measure ν_Λ fill toward their exact curves. A visualization of the "zeta process" of Section 10.2 of the paper on primitive sets and von Mangoldt chains (Erdős #1196) by Alexeev, Barreto, Li, Lichtman, Price, Shah, Tang and Tao.
Probability
OriginalAn interactive realization of Tao's 2016 post “Visualising random variables”: write a short Excel-like program (X = Unif({1..6}), Y = Exp(3), Z = X + Y) and watch the values, empirical statistics, and animated Monte-Carlo plots update live — with one shared ω per tick so coupling and independence come out exact. Random variables, events (True/False, with an empirical probability), the boolean algebra of events, and local conditioning (X | E) — which spawns its own “universe” so a conditional can sit beside the unconditional — are all first-class. Covers the standard distributions, vectors and the central limit theorem, empirical statistics (mean, covariance, quantiles, entropy, …), conditioning by rejection sampling, multiple plot windows, and a theoretical pdf/pmf overlay, with classic-paradox presets (Monty Hall, Berkson, base-rate, …); a full language reference is on the page.
OriginalAn interactive version of Tao's 2022 “A Bayesian probability worksheet”: fill in the underlying quantities — two hypotheses, their prior, and the likelihoods of the evidence — and the derived boxes (prior odds, likelihood ratio, posterior odds and probabilities) compute themselves, tax-form style. Enter any prior or likelihood as a probability or as odds — the linked boxes follow along — or as a range for interval arithmetic, in which case the posterior is reported as a tight range with a sensitivity panel showing which assumption the conclusion leans on most. A plain-language summary reads off the qualitative prior and whether the evidence raises, lowers, or barely moves it; two further views recast the same update as natural frequencies (an “of 1,000 cases…” table that dissolves the base-rate fallacy) and as an additive weight of evidence in decibans on a log-odds number line. Ships thirteen worked examples — the COVID and mammogram base-rate cases, Monty Hall, Bertrand's box, the three prisoners, the boy-or-girl paradox (with the Tuesday-boy variant), the taxicab and DNA (prosecutor's-fallacy) problems, and Sleeping Beauty as halfer, thirder, and the disagreement shown as a range — each with its own commentary, plus a shareable permalink and copy-as-text export.
Linear algebra
All the linear algebra apps below were originally coded by Kim Chi Tran in 2002, in Java 1.0. The porting of these legacy applets — a conversation transcript.
PortedVector addition and subtraction, scalar multiplication, an elementary row operation (v − c·w), and the dot product.
original (Java, 2002)
Ported with the assistance of Claude Code. PortedRow-reduce a 4×5 augmented matrix by applying elementary row operations one step at a time, with an undo history and a running log.
original (Java, 2002)
Ported with the assistance of Claude Code. PortedArithmetic on two matrices up to 5×5 — sums, products, powers, transpose, trace, determinant, and inverse.
original (Java, 2002)
Ported with the assistance of Claude Code. PortedVisualize how a 2×2 matrix transforms the plane — draw in the domain and watch the image appear in the range.
original (Java, 2002)
Ported with the assistance of Claude Code. PortedExplore the eigenlines and eigenvalues of a 2×2 matrix; drag a vector, or drag the columns of the matrix directly.
original (Java, 2002)
Ported with the assistance of Claude Code. PortedOrthogonalise a set of vectors step by step — subtract projections and normalise, with a live inner-product table.
original (Java, 2002)
Ported with the assistance of Claude Code.
Complex analysis
All the complex analysis apps below were originally written by Terence Tao in Java, mostly between 1998 and 2000. The porting of these legacy applets — a conversation transcript.
PortedAn Argand-plane sandbox — drag a complex number and watch its Cartesian and polar forms, with buttons for basic operations.
original (Java, 1998)
Ported with the assistance of Claude Code. PortedDraw a curve in the domain and see its image under w = f(z) for a range of elementary functions.
original (Java, 2000)
Ported with the assistance of Claude Code. PortedDraw points, circles, and lines and watch a Möbius map w = (az+b)/(cz+d) send them to circles and lines.
original (Java, 1999)
Ported with the assistance of Claude Code. PortedDrag z and watch the several branches of the roots and the logarithm move — and swap across the branch cut.
original (Java, 1998)
Ported with the assistance of Claude Code. PortedSee conformality: an analytic map acts locally like multiplication by f′(z), preserving angles.
original (Java, 1998)
Ported with the assistance of Claude Code. PortedDraw a contour and watch the running value of ∫ f(z) dz trace out as a vector sum.
original (Java, 1998)
Ported with the assistance of Claude Code. PortedPick a center and see the Taylor and Laurent expansions of 1/((z−1)(z−2)) and their regions of convergence.
original (Java, 2007)
Ported with the assistance of Claude Code. PortedDraw different paths between two points; their antiderivative images all end at the same place.
original (Java, 2000)
Ported with the assistance of Claude Code. PortedDraw a contour around editable poles; the integral converges to 2πi times the enclosed residues.
original (Java, 2000)
Ported with the assistance of Claude Code. PortedDraw a contour and count how many times its image winds around 0 — the enclosed zeros minus poles.
original (Java, 2000)
Ported with the assistance of Claude Code.
Design philosophy
AI involvement is disclosed. These tools, and their supporting text — including this section — are produced with substantial AI assistance, and every page on this site that contains AI-generated content notes this (a footnote on each app suffices). This matches the site's "maintained (with AI assistance)" footer and the disclosure practice followed in the associated research papers. The AI's role is limited to building the apps and populating them with example data — not to running them: each app then executes deterministically in your browser and makes no LLM (or other network) calls at runtime. The only nondeterminism is deliberate random-number generation, such as the sampling in the random-variable visualizer.
They are visual aids, not authorities. Each app is meant as a secondary, visual supplement for building intuition about a mathematical topic — not as a load-bearing component of a mathematical task. They are not formally verified to be free of bugs. Many display only deterministic mathematical concepts; a few (such as the paper-diagramming applet) instead contain subjective, LLM-generated content that is not intended to be authoritative. For anything that needs to be correct, consult authoritative sources such as textbooks, or fully-featured software such as MATLAB or numpy/SymPy. The emphasis here is on ease of presentation over full expressiveness.
They are private and self-contained by design. No app requires a login or account, and none makes external network calls — everything runs in your browser, and the only files an app loads are other files on this site (for instance, the paper-diagram viewer fetches additional diagram files on demand). The apps deliberately avoid heavy libraries and content-delivery networks, both for speed and to keep the security surface small; there is no tracking or analytics. Most apps store nothing between visits and start each session fresh, though a few may use a cookie solely to remember your own settings.
The code is transparent, but not a template. The source lives in the public GitHub repository for transparency, and the mathematical cores are covered by automated tests — but the code is AI-generated, has not been reviewed line-by-line by a human, and is not optimized for readability or reuse. I therefore don't recommend using it as a base for your own applets. You are very welcome to be inspired by the concepts here to build your own tools; I would only ask that you not publish near-identical copies of these specific apps.
Feedback is welcome — please open an issue. Corrections and suggestions are appreciated. For fixes to content (a wrong dependency in a diagram, a typo, a bad example), a pull request is fine. For changes to the code, an issue is strongly preferred over a pull request: because the codebase is maintained primarily by AI rather than by hand, unreviewed code contributions — even good ones — can make it harder to keep maintaining, so I would rather address the underlying issue than merge a code change.