# "Prime Remainders" visualization

Posted 3 years ago
1502 Views
|
0 Replies
|
5 Total Likes
|
 I was pointed out to the J-Blog's post: Prime Remainders. From the blog: This program calculates primes, takes their remainder and then places a color accordingly. The formular for the color c at prime p with modulo m is c = p mod m. It is a one-liner in Wolfram Language: ArrayPlot[Partition[Mod[Prime[Range[350^2]], 450], 350]] Reproducing the original color scheme is simple: ArrayPlot[Partition[Mod[Prime[Range[350^2]], 450], 350], ColorFunction -> (Blend[{Black, Red}, #] &)] And the app: Manipulate[ArrayPlot[Partition[Mod[prm, mod], 100], ColorFunction -> (Blend[{Black, Red}, #] &)], {{prm, Prime[Range[10^4]]}, None}, {{mod, 250}, 3, 1000, 1}] I would recommend checking out New Kind of Science book especially Chapter 4: Systems Based on Numbers for many interesting patterns generated by numbers.