# Prime spiral ?

1. Sep 7, 2006

### lokofer

Prime "spiral"?..

Sorry i don't know the name of this "Phenomenon" i heard (due to Sierpinski perhaps?) that if you distributed the prime numbers into an square in some manner there was an spiral that..run over all primes or something similar...i think it was called "Sierpinski spiral" or something similar...is there any information?..thanks...

2. Sep 7, 2006

### shmoe

Try searching for "Ulam spiral" or "Prime spiral"

3. Sep 7, 2006

### HallsofIvy

Except that it is not a very "good" spiral. Patterns in prime numbers are generally in the eye of the beholder.

4. Sep 8, 2006

### Robokapp

Out of curiosity I stared at the first 25 Prime numbers...from 2 to 101. They seem to form a parabola with irregularities that repeat periodically...like a sin function going along the lnie of a parabola...

Okay...ok I'm coming up with something. I graphed the following:

y1=Fnint(sin(x),x,0,x)+Fnint(x),x,0,x) and it does look alike. It's too abrupt, it needs a rational coefficient in front but it matches the first points. Looks like I'll be up for a few more hours...:)

Edit1: 0.6 in front does it for first few terms but the raise still catches up too fast. the coefficient needs to have some X in it...

Edit2: I added a $$* 0.91^{\frac{2x} {3}}$$ at the end of the expression to keep it from increasing so fast...it's still too fast...

Edit3: one thing i'm noticing the "spirals" are bigger and bigger as numbers go up. The SIn function needs a $$+x$$ maybe?

Did anyone actually try this ever?

Well that's my shot at the prime numbers...

$$y=0.91^{\frac{2x} {3}}(\int_{0}^{x} Sin({x}) + \int_{0}^{x} x)$$

It's too slow for primes past the 50s area but...I'm sure someone smarter than me can figure it out...unless soemone already has.

Last edited: Sep 8, 2006
5. Sep 10, 2006

### shmoe

Whay are you trying to do here? I don't understand at all what this function is supposed to be doing.

6. Sep 19, 2006

### Robokapp

well...i graphed it as (x, y) values where x goes up by 1. and it looked like a diagonally waving function. So how do you make a sin function go diagonally? you give it some $$\int{x}$$ so it looks triangular, and then stick a sin(x) or cos(x) to make it wave...and then i just played with it to make it somehow fit the pattern that the plot set for me...

it looks like a sin function wrapped around the y=x line i guess...but I have no clue how to express that in polar equations. It was 6am...I was bored. don't ask.

and the first part...well the "wavings" or "Spirals" were changing regularly, so somehow i had to express that change in them as something with "x" in them...

0.91 raised to some power of x seemed to reduce the increase efficiently...for first 20 or so numbers.

Last edited: Sep 19, 2006
7. Sep 19, 2006

### CRGreathouse

That's usually handled with a linear function + a sinusoid (y=x+sin(x), for example).

The first thouand or so primes aren't particularly representative. Try focusing on the larger ones more.

8. Sep 19, 2006

### shmoe

You mean you were looking at the points (n,p_n) where p_n is the nth prime? like (1,2), (2, 3), (3, 5), (4, 7), etc.??

Your function from before $$y=0.91^{\frac{2x} {3}}(\int_{0}^{x} Sin({x}) + \int_{0}^{x} x)$$ tends to zero as x-> infinity, and is decreasing around x=40 so it can't be close for very long (as mentioned the first thousand primes don't say much, let alone the first 25).

You might want to take a look at http://primes.utm.edu/howmany.shtml#2 for asymptotics for the nth prime and http://mathworld.wolfram.com/PrimeSpiral.html to see what the "prime spiral" from the OP was referring to.

9. Sep 22, 2006

### mathwonk

you seem to be noticing the convexity of the prime number graph, as revealed by gauss's formula in hadamard's(?) "prime number theorem."