This website is my mathematical travelogue — a personal expedition through the perplexing, fascinating, often vexing landscapes of prime numbers and number theory more broadly. I don't intend it as a comprehensive resource or a polished educational product; this is a paper trail of my own curiosity-driven explorations. It's a map of where my curiosity has dragged me.

It's also as much about my own long struggle with communicating math ideas as it is about actually pulling up my sleeves and exploring math myself. I'm drawing here from my background in game development, and my background in learning games research, too, to fuel my experiments. I've turned to dialogues, interactive code samples, and all sorts of visualizations, with the hope that they might make abstract questions and concepts explorable and, with a bit of luck, intuitive or even exciting. I hope to capture my own experience of having my visual imagination sparked, as well as the compulsive cycle of asking questions and diving into experiments. The site features interactive animations, built with d3.js, function-plot.js, and vis.js, alongside custom JavaScript canvas approaches based on ideas from my time in game development. I have much more ambitious incomplete animations and interactive projects in progress than what I'm launching with at the time of writing.

I intend the site to focus on:

  • Ideas presented as Socratic dialogues, trying to capture something like my own internal monologue, and the iterative process of curiosity flaring, leap-before-you-look optimism, and subsequent skeptical questioning and refinement
  • Live, runnable code examples to foreground computational exploration
  • Interactive visualizations for exploring mathematical ideas, hopefully providing some intuition and sparking new questions along the way
  • A mixture of established, popular mathematical concepts that I personally find fascinating alongside some ideas that are either novel or (let me humbly suggest) really, really, really ought to be much better known

The explorations here have taken me through puzzling about the distribution of prime numbers, developing algorithms for prime counting and summing, exploring combinatorial approaches to number theory functions, visualizing the Riemann zeta function and its zeros as well as Dirichlet series and Poisson summation, exploring turtle graphics and vector walks to build intuition about complex analysis, exploring summability methods, leaning hard on unusual inverse Mellin transforms, and investigating methods of approximating prime counts, among many other odds and ends. These are all topics I hope to cover in much richer detail here, ideally in surprising and compelling visual and computational ways.

So my intention is this project sits at an intersection — it's both an exploration of a certain very personal relationship to certain number theory ideas, as well as a series of experiments in how to communicate that experience of those mathematical ideas. It draws significant appreciative inspiration from other sources like Grant Sanderson's 3Blue1Brown, the work of Bret Victor, Tristam Needham's "Visual Complex Analysis", Harold Abelson and Andrea diSessa's "Turtle Geometry", Gerald Jay Sussman and Jack Wisdom's "Structure and Interpretation of Classic Mechanics", Daniel Shiffman's "The Nature of Code", and Inigo Quilez's work in creative coding.

Hopes for the Future

Animations, the Browser, Videos, Games

At the time I'm writing this and launching the site, the material I'm uploading really only scratches the surface of the effort I've put into animating math ideas. I have a lot more live-in-the-browser, interactive, JavaScript-based techniques I'm anxious to roll out. To that end, I have a video that I'll be uploading shortly that previews much of that work.

A video about Logo Turtles, vector walks, geometric series, and Dirichlet series I made in 2023

In the mean time, the above video was a mathematical video project I made in summer 2023, all recorded real-time in a web browser in JavaScript (and thus trivially interactive). It covers Logo turtles, geometric series, and the Riemann zeta function. Made for a contest with a deadline, I ran out of time on it, so the exposition barely exists and is a paltry shadow of what I wanted to explain. But some of the ideas and visual techniques have vastly more potential than touched on in it. I hope to return to this - I had a much sharper, more interesting argument I wanted to get across, but I think I was trying to cram far too much into a single video.

I have great hopes about exploring these visual approaches even further, be it in interactive web pages, Youtube videos, or, perhaps even returning to my game making roots, in an indie browser game context.

Number Theory Topics

At the initial launch of this website, I've written up several dialogue series that cover some of my own questions, as well as my explorations that resulted from those questions. Most of that effort, captured in these initial dialogues, took place between 2002 and around 2015, I think. But this doesn't come anywhere close to exhausting the questions and explorations I've worked through since. I have a lot more ideas I'd like to cover.

For what it's worth, below are screen shots of my archives of both paper-and-pen notebooks as well as Mathematica notebooks, each of which capture various strands of inquiry on my part. These contain a wealth of topics I'd love to write up in dialogue format, animate, and provide live computational demonstrations of. There's specifically a lot of ideas I worked through between 2019 and 2023 that'd I'd really like to cover, if I can find a way to do it.

A screen shot of folders of my paper-and-pen notebooks, many containing questions and explorations I haven't covered or animated at the time of writing
Scans of My Paper Notebooks, Containing My Pen and Paper Experiments, by page count (# pg)
A screen shot of folders of Mathematica notebooks I've created that I haven't written about or animated at the time of writing
A record of my various Mathematica explorations, by count of notebook files (nb #). Of course, not all notebooks are created equal. But there's some interesting stuff in there

To tip my hand ever-so-slightly here, despite my best efforts not to give off a crank vibe... at the time of writing, I've struggled to do my due diligence as well as I know how, tracking down prior results and citing them when I know of them. The chances are good that at least some of what I write about here has precedent I don't know about, and I've just missed it. And my hope is that, even if that happens, my dialogues, interactive animations, and running code here are useful, even if I've overlooked priority on some of these ideas.

Nevertheless, a lot of the mathematical ideas here were arrived at on my own and thus were, at the very least, independently discovered. I think, at the time of writing, that I've covered some big, fascinating ideas here. And I have a few more big, comparably fascinating ideas lurking in those Mathematica notebooks as well that I hope to give an airing here as well.

The Future

As I note at the end of all my articles, despite my obvious passion, I'm struggling to find a way to make all of the above work, just in terms of time and resources. If you happen to be on friendly terms with any wealthy benefactors / tech moguls / foundation heads, or are yourself such a person, and this work is the sort of thing you'd appreciate supporting (whether it be the experiments in visualization or the experiments in math itself), don't hesitate to let me know.

About the Author, Nathan McKenzie

My path to creating this site has been less than straightforward.

I've worked as both a AAA game developer (contributing to titles like Raven Software's Take No Prisoners, Heretic 2, Quake 4, and Soldier of Fortune) and an independent game creator (releasing six indie games that garnered over 8 million views collectively). I've been drawing heavily on this background as a technical foundation for interactive graphics, animation, and computational thinking here, serving as a bedrock to my approach to mathematical visualization.

I've also had the great fortune of collaborating with pioneering researchers in game-based learning, including Professors Jim Gee, Kurt Squire, and Constance Steinkhuler during their formative work at the GLS group in Madison, Wisconsin in the mid-2000s. More recently, I've worked with Professor Jessica Hammer at Carnegie Mellon University exploring innovation in game design and knowledge representation. Conversations with those researchers have heavily shaped my own line of questions about communicating complicated ideas through interactive animations and games.

Both of these parts of my background have prepared me well, I hope, for exploring interesting ways of communicating math ideas digitally and visually. Despite all that, what I don't actually have is much of a formal mathematical background. I do consider myself an amateur in the original sense of the word — pursuing an interest from love (or, well, compulsion, realistically) rather than profession. I fell into these topics after being randomly grabbed one summer by a deep fascination with the erratic behavior of the distribution of prime numbers, sending me tumbling down the rabbit hole of computational experiments with prime counting... and, well, here we are.

For what it's worth, perhaps as a kind of short hand, my self-taught mathematical journey has been especially shaped by Harold M. Edwards' "Riemann's Zeta Function" and Alexander Ivic's "The Riemann Zeta Function - Theory and Applications". I've also spent considerable time with Crandall and Pommerance's "Prime Numbers - A Computational Perspective", Iwaniec and Kowalski's "Analytic Number Theory", Hardy's "An Introduction to the Theory of Numbers" and, perhaps oddly, Fogiel's "Handbook of Mathematical, Scientific, and Engineering Formulas"... along with a certain amount of self-directed journal article reading in selected topics. I've also spent a pretty substantially amount of time poring over the Digital Library of Mathematica Functions, The On-Line Encyclopedia of Integer Sequences, Wolfram Mathworld and wikipedia, the Mathematical Functions Site, and of course Mathoverflow and math.stackexchange.com, as well as an assortment of lecture series and explainers on Youtube, and, most recently handy conversations with AI.

Math and programming books I've relied heavily on'
Some of my trusty companions along this journey

So I've done some reading - but like most self-taught amateurs, I want to name and acknowledge that my mathematical background here will be capricious and oddly spotty; the time I spent acquiring expertise in game development instead probably makes those gaps inevitable. I'm trying to be a responsible amateur here. I say all this as neither a justification nor an apology; I'm just hoping to set expectations correctly here.

A friendly looking picture of myself
Me, looking considerably more friendly than I actually am
Some helpful coffee mugs
More faithful companions on my journey here