Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Prime spiral ?

  1. Sep 7, 2006 #1
    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...:frown: :frown:
  2. jcsd
  3. Sep 7, 2006 #2


    User Avatar
    Science Advisor
    Homework Helper

    Try searching for "Ulam spiral" or "Prime spiral"
  4. Sep 7, 2006 #3


    User Avatar
    Staff Emeritus
    Science Advisor

    Except that it is not a very "good" spiral. Patterns in prime numbers are generally in the eye of the beholder.
  5. Sep 8, 2006 #4
    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 [tex]* 0.91^{\frac{2x} {3}}[/tex] 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 [tex] +x [/tex] maybe?

    Did anyone actually try this ever?

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

    [tex]y=0.91^{\frac{2x} {3}}(\int_{0}^{x} Sin({x}) + \int_{0}^{x} x)[/tex]

    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
  6. Sep 10, 2006 #5


    User Avatar
    Science Advisor
    Homework Helper

    Whay are you trying to do here? I don't understand at all what this function is supposed to be doing.
  7. Sep 19, 2006 #6
    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 [tex]\int{x}[/tex] 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
  8. Sep 19, 2006 #7


    User Avatar
    Science Advisor
    Homework Helper

    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.
  9. Sep 19, 2006 #8


    User Avatar
    Science Advisor
    Homework Helper

    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 [tex]y=0.91^{\frac{2x} {3}}(\int_{0}^{x} Sin({x}) + \int_{0}^{x} x)[/tex] 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.
  10. Sep 22, 2006 #9


    User Avatar
    Science Advisor
    Homework Helper

    you seem to be noticing the convexity of the prime number graph, as revealed by gauss's formula in hadamard's(?) "prime number theorem."
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Discussions: Prime spiral ?
  1. Ulam Spiral (Replies: 5)

  2. RH and Ulam's spiral (Replies: 2)

  3. Prime Numbers (Replies: 1)

  4. Prime ideals (Replies: 9)

  5. Prime Ideals (Replies: 1)