Inspired by the Ulam spiral, I developed a function to translate natural numbers > 0 to RGB colours, based on their prime factorisation. Number 2 provides the maximum red value (let's assume 1), primes of the form 4·n+3 (3, 7 ...) provide a green value of (6/7)^n (thus 3 gives 1 to green), and primes of the form 4·n+5 (5, 13 ...) provide a blue value of (6/7)^n (thus 5 gives 1 to blue). When a factor repeats, it is scaled by 4/5 for each repetition, so for example 2² gives a red value of 4/5, and 7³ gives a green value of 6/7 · 4/5 · 4/5. When several prime factors add to the same primary colour, they are averaged. Number 1 is just black. I think (but my math skills are not enough to prove it) that the colouring function gives a different colour to each number (assuming infinite precision in the representation of colours). Number 30 is pure white (2·3·5), and big primes are increasingly darker. Even numbers have red component, odd numbers don't.
The first and second images show the Ulam spiral using these colours, they start at the center (black square, number 1), number 2 is above (variation for aesthetic reasons), and then the count rotates as usual.
Third image is based on the Sacks spiral (there is a superb web page explaining it in detail: numberspiral.com), but 1 is at the center and for aesthetic reasons it is rotated 90 degrees and it rotates counterclockwise.
#mathart #mathematics #primes #primesFactorization

@mc

The sequence of exponents (including the zeroes) in the #PrimesFactorization itself forms a kind of #VectorLogarithm (I think I used to call it) since the #PrimeMask (?) or #PrimeWise sum of the logs is the log of the product.