Find sum of exponents of prime factors of numbers 1 to N
Given an integer N, the task is to find the sum of exponents of prime factors of numbers 1 to N. Examples: Input: N = 4Output: 4Explanation:Numbers up to 4 are 1, 2, 3, 4 whereThe exponent of 1 in the prime factorization of 1 is 0 (20), For 2 it is 1 (21), For 3 it is 1 (31), and For 4 it is 2 (22).