public int Run() { ulong i = 600851475143; PrimeChecker pc = new PrimeChecker(); var factors = pc.GetFactors(i); var primeFactors = factors.Where(f => pc.GetFactors(f).Count() == 2).ToList(); return((int)primeFactors.Max()); }
public int Run() { Console.WriteLine("Prime Checker"); PrimeChecker pc = new PrimeChecker(); for (ulong v = 1; v < 5000; v++) { var factorList = pc.GetFactors(v); factorList.Sort(); Console.WriteLine(factorList.Aggregate("", (disp, val) => disp + val.ToString() + ",")); } return(1337); }