Originally Posted by

**whiteflags** You said that once you find the prime factorization of one number, you would add all of them to another number which is the answer.I told you in a previous thread that this would only work if you divide by prime numbers. Well to do that you need to have a prime number test, the simplest of which is trial division: repeatedly divide the number you think is prime by smaller integers, and if you can find a number that divides without a remainder, then the number is composite. Or, you can make a list of primes. This is absolutely required if you want to do this right.

Once you know enough primes, you can start dividing to see which ones are in your numbers. The sum of the prime factors of 42 is 13, every factor appears only once. The sum of the prime factors of 16 is 8, though, so watch out for primes that appear more than once.

If you don't know enough math to do them I would suggest you steer clear of the Project Euler site.