1
$\begingroup$

I have this number 42900, that contains prime factors 2,2,3,3,5,5,11,13 But I got this by keep dividing until i got a prime factor.

3 * 143 * 100

3 * 143 * * 5 * 5 * 2 * 2

Then for 143, i had to start from 2 to 11 to get 11 * 13

Is there any easy way?

  • 2
    I think that the question in the title is an open question. It is unknown whether there exists faster algorithms for this. For the second I think there are faster algorithms than the naive algorithms, but if these are to be considered easy I don't know...2017-02-21
  • 0
    Public-key cryptography is based on the premise that large prime factors are hard to find. But lucky for you, you have a number with lots of easy small prime factors.2017-02-21
  • 0
    As far as I know the fastest known algorithm is Pollard-Strassen.2017-02-21
  • 0
    In most cases a prime factorization will begin, as you did, with [trial division](https://en.wikipedia.org/wiki/Trial_division) to eliminate smallish possible prime factors.2017-02-21

2 Answers 2

1

since we have $$\sqrt{42900}=10\sqrt{429}$$ and $$\sqrt{429}<21$$ you must only try all primfactors until $$19$$

  • 0
    Exactly how does this differ from the way Smit did it?2017-02-21
  • 0
    you can not read it? we must only cosider the primes lower than $19$2017-02-21
  • 1
    It seems that exactly what Smit did. For example in factoring 143 he goes from 2 to 11 so he certainly doesn't check any factors larger than $\sqrt n$. He doesn't say explicitely that he skips primes, that's true (but that doesn't mean that he didn't).2017-02-21
  • 0
    Indeed, he should delete his answer too ;)2017-02-21
1

When you found $143$ as a factor, you did not need to repeat the small prime factors $2$ through $5$ already found. You could pick up with the next prime factor possibility $7$, checking up to $\sqrt{143}$ to be sure all are found.

The Wikipedia article gives some details on optimizing trial division, and it has been discussed here before.