Radiant

Radiant generates radiant primes for you.

Inspired by something I read, I wrote this C++ program to generate radiant prime pictures. Give it a parameter, and it will take all the primes up to that number, convert them to all the bases up to n−1, reverse the sequence of digits, and convert them back to decimal.

The ones which are still prime are marked on a grid of primes and bases. After a few, you see an amazing radiant pattern:

You can specify the number to head towards, a right-hand cutoff point, and choose whether to cache prime values (using up more memory, but slightly quicker), or calculate for each one (less memory, slower).

Radiant Screenshot

Tested on several Linux flavours and Mac OS X (and possibly Solaris too).

Download the C++ source, or the GCC 3.2 Linux executable: caching, or not caching.

Now in Common Lisp!

I implemented radiant in Common Lisp; here is a properly-commented version.

Back to applications index, or back home.