Prime Remainders
2015-11-07, post № 79
mathematics, programming, Pygame, Python, #%, #black, #mod, #modulo, #red
This program calculates primes, takes their remainder [1] and then places a color accordingly. The shapes are quiet interesting. [2]
Controls
- ‘Space’ takes a screenshot.
Source code: prime-remainders.py
Footnotes
- ▲ The formula for the color 𝑐 at prime 𝑝 with modulo 𝑚 is 𝑐 = 𝑝 mod 𝑚. (𝑚 = 𝟣𝟢 on the left, 𝟤𝟧𝟧 on the right and 𝟧𝟢𝟢 on the bottom)
- ▲ [2020-07-16] Looking back at it, I am quite surprised that I stumbled upon “analyzing” prime remainders back then, not knowing how deeply rooted in number theory they are.