This isn’t exactly it, but roughly: Make a vector space with primes as a basis (instead of “x, y, z,…” use “2, 3, 5, …”). For a number, find its prime factors. Make a vector and set elements corresponding to the prime factors of the number equal to 1. Apply some algorithm to map a high-dimensional (more than 2 elements) vector into a two dimensional image where color has some significance.
Numbers are placed in an image according to their prime numbers