Message Boards Message Boards

GROUPS:

"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]]

enter image description here

Reproducing the original color scheme is simple:

ArrayPlot[Partition[Mod[Prime[Range[350^2]], 450], 350], ColorFunction -> (Blend[{Black, Red}, #] &)]

enter image description here

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}]

enter image description here

I would recommend checking out New Kind of Science book especially Chapter 4: Systems Based on Numbers for many interesting patterns generated by numbers.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract