Skip to content

Latest commit

 

History

History
20 lines (12 loc) · 1.08 KB

README.md

File metadata and controls

20 lines (12 loc) · 1.08 KB

UlamSpiral

Making an Ulam Spiral. With rainbow colors.

If you do not know what an Ulam Spiral is, it is a thing in mathematics, involving prime numbers. Look here to learn more: https://mathworld.wolfram.com/PrimeSpiral.html

The number 1 is gray so the eye knows where to start. The prime numbers are all black, as usual.

Every multiple of 2 is colored red -- (except for 2, because it is prime, and hence already black)

Every multiple of 3 is colored orange -- (except for numbers which are already colored, such as primes and multiples of 2)

Every multiple of 5 is colored yellow -- (except for numbers which are already colored, such as primes, and multiples of 2, 3)

Every multiple of 7 is colored green -- (except for numbers which are already colored, such as primes, and multiples of 2, 3, 5)

Every multiple of 11 is colored blue -- (except for numbers which are already colored, such as primes, and multiples of 2, 3, 5, 7)

p