I really didn't want it to come to this, the point of course of PE is that I should try to solve the problems myself. 

The first two I managed in less than an hour, unfortunately I am completely stuck on problem 3. Now I have tried the traditional method of division by trial, of course this is too slow, I've tried to optimize the division by trial by dividing by *sqrt(n)* but it is still way too slow to get the highest prime factor of 600,851,475,143. 

Now I've even tried to use the *Sieve of Eratosthenes* for this, which I have to admit I barely understand, but it's still not cutting it, first of all the amount of "marked" numbers causes an exception to be thrown because the amount of entries becomes gigantic when you try to generate all primes up to 600,851,475,143. 

I'm stuck and quite frankly I'm in a place wher eI'm starting to get annoyed with this right now.. 

Here's my code:

```
class Program
    {
        // The prime factors of 13195 are 5, 7, 13 and 29.
        // What is the largest prime factor of the number 600851475143 ?
        static void Main(string[] args)
        {

            Console.WriteLine(GetHighestPrimeFactor(600851475143).ToString());
            Console.ReadKey();
        }

        static List<long> GeneratePrimeNumbers(long n)
        {
            // Let's use the Sieve of Eratosthenes for this
            var markedNumbers = new List<long>();
            var primes = new List<long>();

            for (long i = n / 2; i < n; i++)
            {
                // If this is false then this is a prime number, add it to the list of primes
                if (!markedNumbers.Contains(i)) 
                {
                    primes.Add(i);

                    for (long j = i; j <= n; j+= i)
                    {
                        markedNumbers.Add(j);
                    }
                }
            }

            return primes;
        }

        static long GetHighestPrimeFactor(long n)
        {
            var primes = GeneratePrimeNumbers(n);

            // Loop backwards and return when we hit the first prime number
            for (long i = n / 2; i > 1; i--)
            {
                if (n % i == 0)
                {
                    if (primes.Contains(i))
                    {
                        return i;
                    }
                }
            }

            //Code should not reach this point of execution
            return -1;
        }

```