Y
Hacker News
new
|
ask
|
show
|
jobs
by
gbh444g
1781 days ago
Are there large Ulam spirals? e.g. 100k x 100k, where each pixel is the density of prime numbers there. Do they show any interesting structure?
1 comments
zamadatix
1781 days ago
Sure, largely similar patterns just more zoomed out. There are well known ways to generate a coordinate conversion e.g. from
http://www.survo.fi/demos/index.html#ex51
x(n)=x(n-1)+sin(mod(int(sqrt(4*(n-2)+1)),4)*pi/2) y(n)=y(n-1)-cos(mod(int(sqrt(4*(n-2)+1)),4)*pi/2)
Which can make something like generating enormous spirals very quick with a simple GPU shader.
link