In 2016, two mathematicians, Kannan Soundararajan and Robert Lemke Oliver found that the prime numbers do not occur at random when looking at the final digits of subsequent primes. For instance, a prime ending in 9 is more likely to be followed by a prime ending in 1, than any other digits (1, 3, 7 […]

## The Density Plot of the Prime Gaps is a Fractal

As you look at the density plots of increasing numbers of prime gaps (the distance between subsequent primes), a fractal emerges. Just get the gaps and graph the densities with this simple R code:

1 2 3 4 5 6 7 8 9 |
library(primes) max <- 100 p <- generate_primes( min = 0, max ) gaps <- p[ 2 : length(p) ] - p[ 1 : length(p) - 1 ] plot( density(gaps), xlab = 'prime gaps', main = 'Below 100' ) |

For increasing numbers of gaps (shown to 100_000_000), this results in the following graphs. You can see the self-similar, fractal […]

## Alternatives to the Logistic Equation

tl;dr: bifurcation.R Yesterday, I decided to plot the bifurcation diagram of the logistic equation. This is a famous plot from the 70s, that many geeks will be familiar with (left). It shows that simple systems can switch into “chaos mode” and begin to bifurcate wildly. To produce the graph, we use code in the R […]

## Plotting Successive Primes Modulo A Number

tl;dr: https://github.com/ology/Math/blob/master/primes/sequence-pairs File this under Recreational mathematics… I have this passionate curiosity for seeing the primes “folded in on themselves” – constrained to a phase space. I also have a burning desire to visualize successive events. I suppose that I am searching for “strange attractors”, as with the famous water drip […]

## Visualizing Chatter on a Polar Plot

What does IRC chatter look like on a polar plot, with lines linking the conversations?

## Fibonacci v Primes: Cage Match!

Today I decided to more deeply investigate this curious math thing I discovered (for myself) – Plotting the Fibonacci numbers by Prime numbers each by a given modulo. “Fibo-what? Mod-what? So what!”, you say. :p tldr code: slice-seq and slice-seq.R For the mechanics, I use Perl to produce the data and R to visualize it.

## Stoic Philosophy + Quasi-Algebraic Logic

On the bus too work, I am reading this classic, but not especially politically correct, Roman Stoic philosopher, Epictetus. Some of his fragments are obvious, but some are inscrutable. Sometimes, I read this little book I found at the library called, “Many-valued Logics.” So naturally, I decided to translate one of his less cryptic statements, […]

## All Possible Fretboard Positions

tl;dr: The fretting program on github. For a while now, I have been burning with a desire to see (and practice) every playable guitar fingering position, in a mathematical (not musical chord based) order, for any arrangement of fingers.

## Primes, Gaps & Gaps of Gaps

tl;dr: Code and Visualization of the prime “gaps of gaps” table The prime number sequence fascinates me. I am not sure why but exposing properties in it is exciting. Even if they are mundane and “obvious to everyone else”, the fact that I can answer questions visually, sometimes thrills me. * Update below

## Musical Deltahedra

One day I became curious about musical triads (three note chords) as geometric triangles. I speculated about the actual sizes of the sides, given the intervals between the notes at the corners. Then, in no time, I was off day-dreaming about wobbling, vibrating triangles and string theory…