-3

Is there a faster way to find the prime factors of 600851475143?

My computer still has not been able to produce an answer. Here's my code:

import sympy
num = 600851475143
list(filter(lambda x: sympy.isprime(x) and num % x ==0,range(2,600851475143 +1))
eyllanesc
  • 235,170
  • 19
  • 170
  • 241
Don Cheeto
  • 111
  • 1
  • 9

1 Answers1

0

This returns instantly:

In [17]: import sympy                                                                                                             

In [18]: sympy.factorint(600851475143)                                                                                            
Out[18]: {71: 1, 839: 1, 1471: 1, 6857: 1}

So

In [19]: max(sympy.factorint(600851475143))                                                                                       
Out[19]: 6857
Oscar Benjamin
  • 12,649
  • 1
  • 12
  • 14