prime factors

Discussion in 'Programming' started by ghostrider_, Apr 18, 2010.

  1. #1
    hello.. i want your help..
    what i want to do is find the prime factors of a number.. specifically i want to check its largest prime factor, so as to see if the number is B-smmoth.. can anyone help me with a faster algorithm than trial division??

    i have found those algorithms but i don't get them.. and i dont know if they are aproppriate..
    any help??
    
    http://en.wikipedia.org/wiki/Quadratic_sieve
    http://en.wikipedia.org/wiki/General_number_field_sieve
    
    Code (markup):
    thanks..
     
    ghostrider_, Apr 18, 2010 IP
  2. NeoCambell

    NeoCambell Peon

    Messages:
    456
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
  3. ghostrider_

    ghostrider_ Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    what i ve done is construct a linked list of all the prime numbers and then check it's one number between 1 and 100.000.000 to find if its largest prime factor..

    but i would appreciate if there are any ideas of making it faster than that.. thanks..
     
    ghostrider_, Apr 19, 2010 IP
  4. ghostrider_

    ghostrider_ Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    any idea for that: if i want to find alla the numbers between ,lets say 1 and 100.000.000 whose largest prime factor is less than 1024...??
     
    ghostrider_, Apr 21, 2010 IP