## Number of ways to factorize an integer

I've a difficulty in solving this question. Can someone please help me? Thanks.

********
Problem Description:
Any positive integer n (n>1) can be expressed as a product of a set of positive integers that are greater than 1, e.g., 24 = 3 * 8. Usually there is more than just one set, e.g., 24 = 4 * 6 = 2 * 12 = 2 * 2 * 6. So {4, 6}, {2, 12}, and {2, 2, 6} are another three sets. The order of elements in the set does not matter, so {2, 2, 6} is considered the same as {2, 6, 2}. (Note set is different from mathematical definition of set, as we can have duplicated items). Of course {24} is another set whose product equals to 24. Let's define a function f over all positive integer as:

f(n) = the number of different ways to factorize a integer n , if n>1
f(1) = 1

f(24) will yield 7 as there are 7 such sets: {2, 2, 2, 3}, {2, 2, 6}, {2, 4, 3}, {2, 12}, {3, 8}, {4, 6}, and {24}

Given an interval [i...j], try to find an integer n with the biggest f(n).

**********
For this problem, we are suppose to output the integer n that has the biggest f(n).