/// <summary> /// A list of prime numbers. /// Given a range of integers by its lower and upper limit, construct a list of all prime numbers in that range. /// </summary> /// <param name="fromRange"></param> /// <param name="toRange"></param> /// <returns></returns> public static List <int> _2_04(int fromRange, int toRange) { return(Lists._1_22(fromRange, toRange).Where(_2_01).ToList()); }
/// <summary> /// Determine the prime factors of a given positive integer (2). /// Construct a list containing the prime factors and their multiplicity. The solution of problem 1.10 may be helpful. /// </summary> /// <param name="number"></param> /// <returns></returns> public static List <(int, int)> _2_03(int number) { return(Lists._1_10(_2_02(number))); }