The prime factors of 13195 are 5, 7, 13 and 29.
What is the largest prime factor of the number 600851475143?.
Runtime: 0
Average: 0 Runs: 0
SD: 0 ms
Max: 0
Min: 1000
To solve this, I used a brute force technique. Instead of including a test
for primality, I included a list of primes.
I check each prime in my list to see if it divides my original number.
If it does, I push that prime into my list of factors and recheck the number
(recently divided by the factor) against the list of primes again and again
until my original number is equal to 1.
I currently have every prime up to 3511 in my prime number array.
###,###