TITLE: Find all the prime factors of $1000027$
QUESTION [10 upvotes]: Find all the prime factors of $1,000,027$.

I got all the factors by testing every number from $1$ to $103$:P, but when I try to do it using algebra, I get stuck.
My work:

$$1000027$$
$$=(100+3)(100^2-3\cdot100+3^2)$$

How do I simplify further?

REPLY [2 votes]: Use the fact that $73 \times 137=10001 = 10^4+1$.
Now,  mark off the number in groups of four digits starting from the right, and add the four-digit groups together with alternating signs.
Applying the above rule, $1000027$ in groups of $4$ is $\underbrace{0100}$ $\underbrace{0027}$. Adding the groups with alternate signs gives $73$. Therefore, $1000027$ is divisble by $73$ and gives $13699$ as quotient.
For $13699$ apply the divisbility test by $7$ by marking of the digits in groups of $3s$ by starting from the right and adding together with alternate signs. Therefore, adding the groups $\underbrace{013}$ $\underbrace{699}$ with alternate signs gives $686$ which is divsible by $7$ and hence $13699$ is disvisble by $7$ 
$13699$ when divided by $7$ gives $1957$.
Now, $1957$ is $1900+57$ and hence is divisible by $19$ giving the quotient as $103$.
Combining them all gives $1000027 = 7\times19\times73\times103$