I just "solved" the third Project Euler problem:
The prime factors of 13195 are 5, 7, 13 and 29.
What is the largest prime factor of the number 600851475143 ?
With this on Mathematica:
Select[Divisors[600851475143], PrimeQ]
It will first give me a list with all the divisors of 600851475143 and then It's going to select the prime ones, giving me:
{71, 839, 1471, 6857}
And thus giving me the answer of 6857. I feel that my solution won't give me better insights into this (since I used almost null mental activity for it) and I would like to know how can I extend this problem, what other ways are accessible on solving it?
I initially thought that I should applying the idea of divisibility, some guys on the PE solved it using the sieve of Eratosthenes, can you suggest other ways that could solve this problem?
Thanks in advance.