Find all the prime factors of $1000027$

Go with the sum of cubes and factor out the $103$ thing (which you already did), then notice that $$100^2-3\cdot100+3^2= \\ =100^2+2\cdot3\cdot100+3^2-3\cdot3\cdot100=\\ =(100+3)^2-30^2$$ then factor it as a difference of squares. Then you'll only have to factor $133=7\cdot19$ by hand and verify that everything else is prime.

Come to think of it, this might be an example of Aurifeuillean factorization. Pretty much everybody knows that $x^4+4=(x^2+2x+2)(x^2-2x+2)$. Now we used (rediscovered, if you'd like) a more complicated thing of the same sort: $$x^6+27=(x^2+3)(x^2+3x+3)(x^2-3x+3)$$


I think that the only important step is the first one.

If you want to find the prime factors of $73\times 103$ it is going to be tough, because you have to try all primes up to $73$.

On the other hand, once you find the factor $103$, factoring $7\times 19\times 79$ is easy by brute force, because the factors $7$ and $19$ are found really fast, and then proving that $79$ is prime is done quickly also.


First of all we want use $$a^3-b^3=(a+b)(a^2-ab+b^2)$$

we find $1000027=103 \cdot 9709$

then we want to use $a^2-b^2=(a+b)(a-b)$. With a clever observation we see that $$9709=10609-900=(103+30)(103-30)=133\cdot 73$$

that can be factored with ease!