Notices
Results 1 to 21 of 21
Like Tree4Likes
  • 1 Post By MagiMaster
  • 1 Post By gonzales
  • 2 Post By John Galt

Thread: Number sequence for primes

  1. #1 Number sequence for primes 
    Forum Freshman
    Join Date
    Oct 2013
    Posts
    15
    I found a sequence that can be iterated to create a list of primes. It can certainly be considered a sieve, but the interesting part of the sequence is the underlying symmetry that seems to guide the distribution of primes within the natural numbers. The sequence contains 1 and misses 2,3,and 5. If any one is interested, the reason 2,3,5 are missed is fascinating to me and I would be happy to elaborate (it is related to phi (0.5+sqrt(5)/2). Here is the sequence:

    0.5, 1.5, 1.0, 0.5, 1.0, 0.5, 1.0, 1.5

    If you start with a base of -0.5 then sum the sequence you have:
    0, 1.5, 2.5, 3.0, 4.0, 4.5, 5.5, 7.0, Then iterate 7.5, 9.0, 10.0, 10.5, 11.5, 12.0, 13.0, 14.5 …

    Go back and multiply by 4 and add 1 to each term:
    1, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 49, 53, 59 ….

    Note the red 49 (which is obviously not prime). Yet, if you continue through the sequence, you will find that the result is primes and multiples of primes greater than 7. Interestingly, the sequence can be advanced to then give all prime multiples of 7, then prime multiples of 11 and so on to infinity (I believe). By "advance the sequence" I am referring to the following matrix:

    1) 0.5, 1.5, 1.0, 0.5, 1.0, 0.5, 1.0, 1.5
    2) 1.5, 1.0, 0.5, 1.0, 0.5, 1.0, 1.5, 0.5
    3) 1.0, 0.5, 1.0, 0.5, 1.0, 1.5, 0.5, 1.5
    4) 0.5, 1.0, 0.5, 1.0, 1.5, 0.5, 1.5, 1.0
    5) 1.0, 0.5, 1.0, 1.5, 0.5, 1.5, 1.0, 0.5
    6) 0.5, 1.0, 1.5, 0.5, 1.5, 1.0, 0.5, 1.0
    7) 1.0, 1.5, 0.5, 1.5, 1.0, 0.5, 1.0, 0.5
    8) 1.5, 0.5, 1.5, 1.0, 0.5, 1.0, 0.5, 1.0

    Sequence (1) gives all primes and multiples of primes greater than 7.
    Subtract sequence (2) from sequence (1) to eliminate all primes multiples of 7.
    Subtract sequence (3) from sequence (1) to eliminate all primes multiples of 11; and so on. A simple calculation places the start of each new sequence in the correct place for subtraction to work. I think of it as a phase shift. A wave interpretation is possible which would include a base, phase shift, and change in frequency for movement through waves 1-8. I actually used this interpretation to check the process for primes less than 1 million.

    At the end of sequence 8, add 30 to sequence 1 and continue on to infinity adding multiples of 30 with each iteration of the 8 sequences.

    It is easier to get an idea of how the sequence works by viewing a website I created to get a visual feel for the process. It is www.GPrimes.com. I suggest you simply click each prime sequence in the header and watch the sequence labeled in red move through the process.

    It may seem that the sequence is arbitrary. It is not. There is a geometric interpretation that I am happy to share if anyone is interested. Again, the most interesting thing about the sequence to me, is not the ability to print primes, but rather, the symmetry of the system that in my opinion guides the distribution of primes within the natural numbers.

    I like to include a small disclaimer with my posts in a legitimate science forum like this. I am not a mathematician. Rather, I am a medical doctor that likes to play around with number theory and theoretical physics. If this is old information, please forgive me. On the other hand, I think the profession benefits from people like me that, being an outsider, tend to think out of the box a little more. That can be useful.


    Reply With Quote  
     

  2.  
     

  3. #2  
    Forum Radioactive Isotope MagiMaster's Avatar
    Join Date
    Jul 2006
    Posts
    3,440
    Two things worth noting.

    There are plenty of sequences that generate a long list of primes with no composites. Yours manages 12 terms (1 isn't a prime) which isn't bad but isn't really huge either. (Google prime generating polynomial for some examples.) Once you hit a gap, the sequence loses interest. If you allow arbitrary gaps, then you could just take the list of integers which trivially contains all the primes.

    Secondly, all numbers are multiples of primes except 1. This is the fundamental theorem of arithmetic. Now, if you meant all the non-primes were squares of primes, that's different and slightly more interesting.

    As a sieve, I can't really evaluate if off the top of my head, but there are some pretty complicated sieves out there as generating primes is a common and useful task.


    Reply With Quote  
     

  4. #3  
    Forum Freshman
    Join Date
    Oct 2013
    Posts
    15
    The sequence actually manages an unlimited number of terms. My webpage has links for the first 8 primes, recovered from the first sequence, but you can go as far as you like. You can update the URL on my website by manually replacing the "value=" number in the query string by a multiple of 30. For example, replace 1 with 31 or 61 or 91 etc and you will get the prime multiples of that number. Do the same with any of the links, for example replace the page for 29 with 59 or 89. I did an iteration using this technique to print primes under a million. It checked. There are no gaps for primes less than a million. My computer filled up its memory with the first million, so I couldn't go further. The sieve issue is fairly straight forward. The list for "1" is the base set of numbers. Subtracting the subsequent lists from this first list results in only primes. The important thing to note is that the lists are completely predictable to infinity (I believe). In my computer, I created two columns; the first is the continuous iteration of the first sequence. Then second just flagged the numbers produced from all of the other lists (I actually did not have to calculate the numbers. I just lined up the lists so I could subtract the aggregated lists from the first list. Primes less than a million were recovered. Thanks for taking a look and commenting.
    Reply With Quote  
     

  5. #4  
    Forum Radioactive Isotope MagiMaster's Avatar
    Join Date
    Jul 2006
    Posts
    3,440
    I'm having trouble following your sieve algorithm, and your website doesn't seem to help.
    Reply With Quote  
     

  6. #5  
    Forum Freshman
    Join Date
    Oct 2013
    Posts
    15
    Here is the code from page Prime1.asp. The header is the same for all pages, Prime7.asp through Prime29.asp. The header contains the function that is called, but all it does is calculate the numbers seen in the webpage and place them in a table. intMultiple comes from the first sequence taking one term at a time. As you can see, the only thing the page is doing is moving through the rows using the original sequence value multiplied by 7, then 11, then 13 etc. I am posting this info really just to show that there is no fancy computing going on. It is just running through the sequences with appropriate adjustments (intMultiple) for each list. sngYIntercept=((intMultiple^2-1)/4)-(intMultiple*0.5) is the calculation used to find the starting point for each list. The value 0.5 changes as the list moves up one. For example the code for Prime1.asp will use 0.5. The code for Prime7.asp will use 1.5, Prime11.asp will use 1.0 etc. Again, after 8 iterations of the lists, all you have to do is implement an outside loop advancing the imtMultiple by a multiple of 30. 31 will use the exact same code as 1. 41 will use the exact same code as 11 etc.

    <!-- #Include file = "Header.asp" -->
    <%
    intCounter=0
    sngYIntercept=((intMultiple^2-1)/4)-(intMultiple*0.5)
    Response.Write "<table border='0' cellspacing='0' cellpadding='0'>"
    Do While IntCounter<100
    Call fcnIteration(1, "0.5", intMultiple, "red")
    Call fcnIteration(2, "1.5", intMultiple, "black")
    Call fcnIteration(3, "1.0", intMultiple, "black")
    Call fcnIteration(4, "0.5", intMultiple, "black")
    Call fcnIteration(5, "1.0", intMultiple, "black")
    Call fcnIteration(6, "0.5", intMultiple, "black")
    Call fcnIteration(7, "1.0", intMultiple, "black")
    Call fcnIteration(8, "1.5", intMultiple, "black")

    Response.Write "<tr><td colspan='8' align='center'>&nbsp;</td>"
    intCounter=intCounter+1
    Loop
    Response.Write "</table>"
    Reply With Quote  
     

  7. #6  
    Forum Freshman
    Join Date
    Oct 2013
    Posts
    15
    Here is the code for the function:

    Function fcnIteration(SequenceNumber, SequenceValue, Multiple, fontcolor)
    Response.Write "<tr>"

    Response.Write "<td width='152' align='center'><font color='" & fontcolor &"'>"
    Response.Write "<font><i>" & SequenceNumber & "</i></font>"
    Response.Write "</font></td>"

    Response.Write "<td width='152' align='center'><font color='" & fontcolor &"'>"
    Response.Write SequenceValue
    Response.Write "</font></td>"

    Response.Write "<td width='152' align='center'><font color='" & fontcolor &"'>"
    Response.Write Multiple*SequenceValue
    Response.Write "</font></td>"

    Response.Write "<td width='152' align='center'><font color='" & fontcolor &"'>"
    sngYIntercept=(sngYIntercept+Multiple*SequenceValu e)
    Response.Write sngYIntercept
    Response.Write "</font></td>"

    Response.Write "<td width='152' align='center'><font color='" & fontcolor &"'>"
    sngDiscriminant=sngYIntercept*4+1
    Response.Write sngDiscriminant
    Response.Write "</font></td>"

    Response.Write "</tr>"
    Response.Flush
    End Function
    Reply With Quote  
     

  8. #7  
    Forum Freshman
    Join Date
    Oct 2013
    Posts
    15
    Should have included this code from the header that calculates intMultiple for Prime1.asp:

    If ISNumeric(Request.QueryString("value")) AND Request.QueryString("value")>0 Then
    intMultiple=Request.QueryString("value")
    Else
    intMultiple=1
    End If
    Reply With Quote  
     

  9. #8  
    Forum Freshman
    Join Date
    Oct 2013
    Posts
    15
    In response to the sieve question. It is easier to see in a spreadsheet. Here is an example.

    The first sequence, 0.5, 1.5, 1.0, 0.5, 1.0, 0.5, 1.0, 1.5 gives:
    1, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 49, 53, 59, 61, 67, 71, 73, 77, 79, 83, 89, 91, 97, 101, 103, 107, 109, 113, 119, 121, 127 www.GPrimes.com/Prime1.asp
    The next sequence (moving down to sequence 2 which is just sequence 1 moved over 1.
    49, 77, 91, 119, 133 etc. Notice these are the numbers you have to subtract from the first sequence to get primes less than 121 or 11 squared. www.GPrimes.com/Prime7.asp
    The next sequence (moving down to sequence 3
    121, 143, etc will remove the numbers from sequence 1 that are multiples of the next prime, 11.

    I went through this process creating the lists for primes less than 1,000,000 and it checked out. Notice the sequence starts with 0.5 then goes down 3 (1.5, 1.0, 0.5) over 1.0 then up 3 (0.5, 1.0, 1.5) then repeats itself. I viewed this as a wave and lined up the list after 1 to subtract any flagged number (it was actually a position in the database rather than a number) Subtracting all of the flagged spaces resulted in the primes. Aligning the waves was not difficult when all waves were converted to a foundation of 0.25 increments.
    Reply With Quote  
     

  10. #9  
    Forum Freshman
    Join Date
    Oct 2013
    Posts
    15
    This may be hard to see, but in the end, the sequence is based on the equation X^2-X=Constant. For X^2-X=1, the zero's are Phi (0.5+sqrt(5)/2 and negative 1/Phi. The discriminant squared is 5 with Y-Intercept=1. Looking at the process from a Y-Intercept perspective, the sequence is bouncing around the Phi zero's by 0.5 which is 3 and 7. Y-Intercept =0.5 results in Discriminant squared =3. Y-Intercept=1.5 results in discriminant squared=7. Take a look at Quadratic Equation Solver and place 1 for X^2 A, -1 for X B and -1 for the constant C. You will see the graph of X^2-X-1 with the Phi zeros. In my opinion, X^2-X-1 is a dividing point for number theory with Primes above X^2-X=1 following one sequence and Primes below or equal to X^2-X=1 following a different rule. This is why the sequence I gave does not include 2,3, 5. It is interesting to see that the symmetry point of this graph is the Critical Line of 0.5 in the Riemann Hypothesis. I know this is all conjecture, but looking at this function is what brought me to the sequence I have offered.
    Last edited by gonzales; November 10th, 2013 at 06:46 PM.
    Reply With Quote  
     

  11. #10  
    Forum Radioactive Isotope MagiMaster's Avatar
    Join Date
    Jul 2006
    Posts
    3,440
    Oh right. I see how it works. So, for anyone else reading... (I've simplified things a bit):

    - Take the sequence 6, 4, 2, 4, 2, 4, 6, 2 and repeat it as often as needed
    - Take the partial sums of the previous sequence (6, 6+4, 6+4+2, ...) and add 1 to them
    - This gives a list of mostly primes
    - Repeatedly:
    --- Take the first unused prime in the list
    --- Take the list from that prime down
    --- Multiply the two and throw the results out from the original list (I don't know if you need to use the original list or the updated list in further repetitions)

    Efficiency-wise, this looks similar to the Sieve of Eratosthenes, but I'd have to run some actual tests to be sure.
    Reply With Quote  
     

  12. #11  
    Forum Freshman
    Join Date
    Oct 2013
    Posts
    15
    Here are some images that make the text easier to understand.

    Notice that imaginary part is geometrically the square root of a negative number.

    Reply With Quote  
     

  13. #12  
    Forum Freshman
    Join Date
    Oct 2013
    Posts
    15
    Interesting that you came up with that sequence (multiply each component in the sequence by 4). That is what I had to do to get the successive lists to line up in my database. I chose to post the original sequence because that sequence maps directly to the equation X^2-X=Constant and in the end, it is that geometric relationship that gives meaning to the sequence and allows one to consider why 2,3,5 are not included.
    Reply With Quote  
     

  14. #13  
    Forum Radioactive Isotope MagiMaster's Avatar
    Join Date
    Jul 2006
    Posts
    3,440
    It's much easier to parse as an algorithm if you pre-multiply and pre-discard the 1.
    Reply With Quote  
     

  15. #14  
    Forum Freshman
    Join Date
    Oct 2013
    Posts
    15
    I would like to post this image just to further (maybe) the importance of X^2-X=1. If one considers the zeros of this graph, Phi and -1/Phi as fundamental quantum measurements in nature, then one could plot quantum multiples of Phi moving along the X axis towards the right, 1*Phi, 2*Phi etc. Similarly, One would count quantum movements of negative 1/Phi moving towards the origin from the left X axis. -1/Phi, -1/(2*Phi), etc. From a quantum physics perspective, the left side would appear to converge to Phi x 10-35 which is very close to the Planck length 1.616199 x 10-35. The positive X axis would appear to move to infinity, yet since it is linked to the negative x axis, it too should converge. I know enough math to understand that this is non-sense, yet if the plane considered is not the complex plane (used to deal with negative square roots) but rather the plane created by the critical line as a symmetric axis for X^2-X=1, then this plane not only allows one to deal with negative square roots (geometrically) but it allows one to consider a dynamic system where one quadrant of the plane expands while the inverse opposite quadrant contracts leaving the system as a whole equal to zero. This consideration is important for a Higgsless model of everything. Well, at least one that I wrote, Theory of Everything:The Quantum Fundamental Unit and Marginal Analysis. I got very little feedback from my physics model, so I thought to myself, if I am right about the fundamentals of nature, then I should not need support from the scientific community, but I should be able to figure out something provable in math; the primes. This led me to the sequence I have posted here. I know I risk being a crazed idiot in front of a respected community. But, this is my chance to get it all out there, and see if some of you professionals see anything of value in the work I have done. By the way, if you get a chance, use a spreadsheet to look at the exponents of Phi, i.e. Phi^1, Phi^2, Phi^3 up to Phi^35. The exponent appears to become an integer rather than a rational number at Phi^35. Phi is 0.5 + sqrt(1.25).

    Last edited by gonzales; November 15th, 2013 at 05:00 AM.
    Reply With Quote  
     

  16. #15  
    Forum Radioactive Isotope MagiMaster's Avatar
    Join Date
    Jul 2006
    Posts
    3,440
    It's well known that the powers of phi get close to integers. In fact, they get close to the Lucas numbers (related to the Fibonacci numbers). If you add (1-phi)^n you'll get exact integers. Lucas number - Wikipedia, the free encyclopedia

    But all that aside, if you think your ideas are going to get any attention without the support of the scientific community, you're dooming yourself to endless ridicule. If your ideas aren't getting some support, there's probably a reason. And if you think you can understand the fundamentals of nature without understanding all the things others have already worked out, you're delusional. I'm not saying this to be mean or rude or dismiss your ideas, but because it's simply how things work. Einstein was not a nobody that suddenly revolutionized physics. He studied everything there was to study about the existing models and then came up with something better. The same applies to every famous scientist ever no matter how the press reports things.

    Your idea makes for a somewhat interesting prime sieve. Don't try and read more into it than that unless you have strong evidence​ for something more.
    John Galt likes this.
    Reply With Quote  
     

  17. #16  
    Forum Freshman
    Join Date
    Oct 2013
    Posts
    15
    I think you hit the nail on the head. I have spent the last few years learning math and considering some questions in physics. I expect that it will be another 10 years of work to either dump general unsupported ideas or learn what is out there and support my ideas with sound logic. Yet, as a newbie to the fields, it is a real opportunity for me to not keep my ideas locked up inside, but rather send them out to the public for comment. I really do appreciate the look you have given and the comments about perspective. It helps greatly. Thanks.
    John Galt likes this.
    Reply With Quote  
     

  18. #17  
    Forum Radioactive Isotope MagiMaster's Avatar
    Join Date
    Jul 2006
    Posts
    3,440
    As long as you're willing to learn and willing to reconsider your ideas in light of new evidence, you should be fine.
    Reply With Quote  
     

  19. #18  
    Forum Freshman
    Join Date
    Oct 2013
    Posts
    15
    I created a spreadsheet view of the sequence iteration. Might make the process easier to see. http://www.gprimes.com
    Last edited by gonzales; November 14th, 2013 at 08:37 AM.
    Reply With Quote  
     

  20. #19  
    KJW
    KJW is online now
    Forum Professor
    Join Date
    Jun 2013
    Posts
    1,734
    Quote Originally Posted by gonzales View Post
    it is related to phi (0.5+sqrt(5)/2
    If indeed the sequence of primes is connected to some deep property of an irrational number, then the golden ratio is an excellent candidate for that irrational number because the golden ratio is in a particular sense the least rational of all the numbers.
    There are no paradoxes in relativity, just people's misunderstandings of it.
    Reply With Quote  
     

  21. #20  
    Forum Freshman
    Join Date
    Oct 2013
    Posts
    15
    Quote Originally Posted by KJW View Post
    Quote Originally Posted by gonzales View Post
    it is related to phi (0.5+sqrt(5)/2
    If indeed the sequence of primes is connected to some deep property of an irrational number, then the golden ratio is an excellent candidate for that irrational number because the golden ratio is in a particular sense the least rational of all the numbers.
    Here are some images that show the relationship between Phi and the primes that I create from the sequence. Three images, sqrt(5), sqrt(7), sqrt(11). Sqrt(5) is the Phi image. I think of it as the break between primes greater than 5 and primes less than or equal to 5. The sequence is based on the Y-Intercept. The calculated primes are just the discriminant squared (length of X-axis cut off by the function; btw, it is also the slope of the function at that point, 2X-1). It is obvious that the Critical Line provides symmetry for the system. I left the values under the square root negative on purpose. The geometry converts to absolute values, but the system is managing negative square roots.

    SQRT(5)


    SQRT(7)


    SQRT(11)
    Last edited by gonzales; November 15th, 2013 at 07:28 AM.
    Reply With Quote  
     

  22. #21  
    Universal Mind John Galt's Avatar
    Join Date
    Jul 2005
    Posts
    14,168
    I'd like to thank MagiMaster for his objective and helpful contribution to this thread. And to gonzalez, thank you for recognising that the result of extensive work on your part may not be ground breaking.

    This is how new ideas should be presented and discussed on the forum. Thanks again.
    MagiMaster and Dave Wilson like this.
    Reply With Quote  
     

Similar Threads

  1. Test for primes
    By knowlege seeker in forum Mathematics
    Replies: 2
    Last Post: April 18th, 2013, 08:28 AM
  2. Primes Ordering Themselves
    By talanum1 in forum Mathematics
    Replies: 4
    Last Post: April 20th, 2010, 03:30 AM
  3. Number Sequence
    By Heinsbergrelatz in forum Mathematics
    Replies: 7
    Last Post: January 18th, 2010, 12:11 AM
  4. graphing primes
    By mysecondwish in forum Mathematics
    Replies: 17
    Last Post: August 19th, 2009, 12:23 PM
  5. Primes
    By talanum1 in forum Mathematics
    Replies: 2
    Last Post: October 2nd, 2007, 05:20 PM
Tags for this Thread

View Tag Cloud

Bookmarks
Bookmarks
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •