20130924, 05:53  #1 
Sep 2013
1 Posts 
searching part of the space using binary search
(I'm a rank hobbyist and I doubt my input is especially inspired, and I really just want to find out how useful the pattern I noticed is. Apologies aside:)
I was looking at the part of the hyperbolic curve near the middle where the curve is very nearly diagonal, and noticed a simple, exploitable pattern: http://media.tumblr.com/2ecc00039204...acK1r3qp3f.png (You'll see that I chose to plot y going downwards, like a timestable.) Near the centre of the curve those squares go diagonally for some long run and then take one step downwards. This is because the curve is slightly greater than 45^{o}, obviously. And if (x+1)*(y1) < target, then x*y must also be less than target. You are only interested in finding and evaluating where it goes down one. So you can travel those diagonals using a binary search or by division. Here is my blog post about this: http://williamedwardscoder.tumblr.co...gbigintegers I'm curious as to if others have already noticed this, or exploited this? 
20130924, 09:42  #2  
Nov 2003
16444_{8} Posts 
Quote:


20130924, 11:45  #3 
Tribal Bullet
Oct 2004
2×3×19×31 Posts 
Per your blog post, you can certainly prove a number to be prime, without factoring it, but the algorithms for doing that are pretty complex. The search term is 'primality proving'.
It is much easier to think about factorization in algebraic terms, and much easier to find patterns using algebaic relationships than to try to spot colors in a table. For example, your experiments appear to be a graphical rediscovery of Fermat's factorization algorithm, which works especially well when factors are near the square root of the input. Fermat's algorithm is very easy to express algebraically (it's hundreds of years old). The objective with factorization is always to factor something bigger, and doing it by eye will not scale. At this point you if you want to really accelerate things you should go to wikipedia and read up on integer factorization; the articles on the various methods are quite good there and you'll be amazed how quickly they work. You also need to get into the habit of doing background reading before coding, especially if you are a professional programmer, because in 2013 it's very difficult to think of something new in the computer field and very easy to leverage the work of others. Last fiddled with by jasonp on 20130924 at 11:46 
Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Riesel Primes k*2^n1, k<300 [Part II]  Kosmaj  Riesel Prime Search  1021  20210225 10:42 
I'm sure this is an ID10T error on my part  petrw1  PrimeNet  1  20170925 23:12 
Numbers in Tables : Part 2  wustvn  Puzzles  9  20071231 05:14 
best Fermat search space program wanted  jasong  Programming  0  20071003 20:34 
Circles part 2  mfgoode  Puzzles  10  20041227 15:17 