A simple way to graphically enumerate the prime numbers by copying binary sequences

First posted October 2013, updated December 2014 and January 2016

While doing other work on the rational numbers, I have discovered a way to identify and enumerate the prime numbers graphically and symbolically. I call this result, and the underlying process that generates it, the "Prime Tableau", since it outputs a table of primes. This looks like one of the simplest ways to generate the primes. This process requires no multiplication, division, or factoring. Just the ability to copy a series of binary symbols repeatedly. The procedure starts from a 3-symbol "seed", and progresses via a simple copying process that requires only an index into the current sequence, the ability to wrap that index to 0, and to go on to the next sequence.

It appears I'm not the first to discover this mathematical object, as it was written about in 2012 (a year earlier than my "discovery") by Drs. John. C. Turner & William J. Rogers, although their procedure and the way they obtained it are different from mine. Here is a link to the first author's website. Two papers that refer to his table (he calls this the "cycle-number triangle") and process are "A representation of the natural numbers by means of cycle-numbers, with consequences in number theory" and "(0,1)-Patterns generated by a double-cycling process; with a proof of the twin primes conjecture". They are an interesting read, to compare to my presentation (I think mine is easier to grasp). The sequence generated by concatenating all the rows of the Tableau is also sequence A217831 in the OEIS database, although the first symbol is different than mine, and only the first 95 symbols have been compared.

In any case, please read on for an interesting and surprising mathematical story of discovery (at least for me!). What is particularly interesting to me is that this discovery came out of work on the humble fractions (the rational numbers), and that it is simply a process of copying symbols, starting from an initial sequence of 3 binary symbols, and involves very little math beyond repeating that sequence (and subsequent sequences) over and over.

The Tableau has been tested out to 100000 lines, and prime numbers up to 99991, and agrees with other lists. I have no proof that it continues to work forever, but from the logic of the process it seems likely to do so.

Links to pages:

- Demo : A very simple Javascript web demo you can run to create some number of lines of the Tableau. This has been tested with Chrome and Firefox, on Linux (Ubuntu 14.04) and Macintosh (10.6.8 and 10.10.5).
- Procedure : The procedure in 4 simple steps with example.
- Background : The math behind the method: the primitive rational numbers.
- C code : Short code in C you can copy and use.
- Javascript code : Short code in Javascript you can copy and use.
- Test : A medium size test of the method. The row method of Tableau creation. Speed and memory issues for programmers.
- Scanner : Another very simple Javascript web demo that reads the Tableau
as a long string without line breaks and scans it for blocks of 1's to recover the primes:

1110100110010100111100100010011111100101010100110110110010100010100111111111100100010100010011111111 1111001010100010101001101001100101100101010101010101001111111111111111001000101000101000100111111111 1111111110010100010101010001010011011001011010011011001010101010001010101010011111111111111111111110 0100010100010100010100010011110111101111011110111100101010101010001010101010100110110110110110110110 1101100101010001010101010100010101001111111111111111111111111111001000001000101000101000100000100111 etc...

©Copyright Sky Coyote, 2013-2016

Funding for this project was provided by my wife Anne.