It's a richer visualization than that. The Sieve of Eratosthenes only marks which numbers are composite -- this visualization actually shows each of the factors.
For all the time and energy already devoted to studying prime numbers, it's amazing how we keep finding compelling new things to say about the subject.
I agree this presentation shows considerable grace and beauty, quite effective at showing the numeric relationships among positive integers in an intuitive clear way. As the scale varies, the "zoom" feature very nicely allows the viewer to appreciate the fractal nature of the numerical order. Educational and fun, it's a creative success.
Just yesterday on HN there was a thread concerning favored books, mentioning "Proofs Without Words", which this site reminds me of. Where it works it is a wonderful concept, and here it works well.
This is beautiful! Not just is it really quite cool to explore with, but is truly gorgeous. It is true as another user put that this is a graphical way of looking at a sieve of Eratosthenes, but to say that it is is “only” suggests to me a lack of appreciation for the beauty (plus, it also maps other non-prime patterns: deficient, perfect and abundant).
Not sure if it's mathematically related to the OP patterns, but the prime number patterns apparent in the Ulam Spiral have always been my favorite example of this:
This can be expanded into a prime sieve that shows what he has here.
#prime.pl
use Math::Complex;
use Math::Trig;
use POSIX;
# P = A = 1/2 B (6 n-cos(pi n)+3) \ B = 1/2 (6 n-cos(pi n)+3)
my $pi = pi;
my @k;
my $count = "100";
my $n = "1";
my @c;
### given two sets A, B returns B \ A (ie all elements that are in B but NOT in A)
sub complement
{
my @set1 = @c;
my @set2 = @k;
my @ans=();
## find intersection of A and B
my @intersection=(@set1);
for(my $i=0;$i<@set2;$i++)
{
for(my $j=0;$j<@intersection;$j++)
{
if($set2[$i] eq $intersection[$j])
{
$set2[$i]="?";
}
}
}
for(my $i=0;$i<@set2;$i++)
{
push(@ans,$set2[$i]) if $set2[$i]!~m/\?/;
}
return @ans;
}
for ($count = 100000 ;$count >= $n; $n++){
my $k = ((3 * $n) - (0.5 * cos($pi*$n))) + 1.5;
push (@k, $k);
}
my $c;
my $x = $#k;
my $y = $k[$x];
foreach (@k){
my $b = $_;
my $n = "1";
$c=1;
next if ($b >= floor(sqrt($y + 1)));
for ($count = $y + 1 ;$count >= $c; $n++){
$c = (((3 * $n) - (0.5 * cos($pi*$n))) + 1.5) * $b;
next unless ($c <= $y + 1);
push (@c, $c);
}
}
print "stophere";
%hashTemp = map { $_ => 1 } @c;
@c = keys %hashTemp;
@c = sort { $a <=> $b } @c;
#@P = ∁
print "stophere";
foreach (@k){
my $b = $_;
my $n = "1";
$c=1;
next if ($b >= floor(sqrt($y + 1)));
for ($count = $y + 1 ;$count >= $c; $n++){
$c = (((3 * $n) - (0.5 * cos($pi*$n))) + 1.5) * $b;
next unless ($c <= $y + 1);
push (@c, $c);
}
}
Allows you to iterate of the next set and find the none prime and remove them from the SET of 1/2 (6 n-cos(pi n)+3) Thats how a sieve works. 1/2 (6 n-cos(pi n)+3) is only good up to n^2 then you need to multiply 1/2 (6 n-cos(pi n)+3) by i as you noted the first non-prime result was @ 5^2 therefore you need to sieve the rest of the numbers up to 7^2 by doing (1/2 (6 n-cos(pi n)+3)) * 5 Then after 7^2 seive off with (1/2 (6 n-cos(pi n)+3)) * 7 you continue to repeat this for all numbers in the original set. See the sieve of eratosthenes. Mine though shows primes as a set of sin waves kind of like what the op has. As a matter of fact the post is basically a visual representation of what I coded above.
This guy plotted the table of numbers and their divisors and found lots of patterns in it.