Sunday, October 01, 2017

Fractal Pattern in the prime numbers

The Smarandache–Wellin number is made by sticking together all the prime numbers.

2 add on 3 add on 5 add on 7... to make 2357111317192329

A reddit user improved my earlier code with generators. That old code is here. And using the generators from this code I got a prime number checker from here.

With 10k steps this looks like

100k steps

and a million steps (digits)

Five million digits

1000 digits from primes

100 digits looks like an album cover

Here every one tenth of the total distance changes the colour so roughly the blue part on the top left is the previous image. These are primes in the base 10 which is probably why the pattern repeats like that.

These seem really similar to each other. The Champernowne constant seems to do something similar, so maybe most sequences of natural numbers stuck together make repeating patterns like this. I tested the even and off numbers and they kind of do.

even numbers 100k digits

odd numbers 100k digits

The code is here so you can play with it, find bugs and recreate the images. Thanks to the help to the reddit user who recreated the images in Mathematica, code here as a sanity check.

Numbers from a sequence in the base ten make a similar pattern that gets ten time bigger each round. Which doesn't sound surprising said like that. Still the pictures look cool I think.

No comments: