1

Say $d(N) =$ Number of factors of $N!$

Briefly: I wish to know if there is a Recurrence relation for this problem.

Now I wish to Know if there is a way to calculate $d(N)$ in terms of previously calculated values ...

I want to know this as a part of the problem on spoj (http://www.spoj.com/problems/EASYFACT/)

What I mentioned was a part of my approach to solve this.

M47145
  • 4,106
kevin
  • 13
  • factors = divisors? – Exodd Jun 10 '15 at 15:59
  • if $N!=1\cdot 2\cdot 3\dot\ ...\cdot N$ then $N!$ have $N$ divisors, right? – janmarqz Jun 10 '15 at 16:01
  • @Exodd yes factors=divisors.. – kevin Jun 10 '15 at 16:34
  • @janmarqz What i meant was like 4!=24 which has 1,2,3,4,6,8,12,24 as divisors.....U r correct that 1,2,3,4...N are divisors but we still have divisors other than that – kevin Jun 10 '15 at 16:36
  • See this: http://math.stackexchange.com/questions/1309948/total-number-of-divisors-of-factorial-of-a-number?rq=1 – jeremy radcliff Jun 10 '15 at 16:39
  • @ jeremy radcliff The link which u gave me works fine for smaller value of N ... But its My bad not to mention constraints on N ..... N can go till 10^8 ... If u wish u can check the problem here http://www.spoj.com/problems/EASYFACT/ – kevin Jun 10 '15 at 16:48

1 Answers1

1

If you know three things, namely factorisation of $N=\prod_n p_n^{i_n}$,

value of $d(N-1)$

and $m_n$ maximal power of $p_n$ dividing $(N-1)!$ for each $n$ then I think you should be able to calculate $d(N)$.

In that case $(d(N)=d(N-1)/(\prod_n(m_n+1)) \times (\prod_n(m_n+i_n+1)) $ by standard number of divisors formula.

I don't think you can simplfy much more unless I misunderstood your question.

Jack Yoon
  • 1,466
  • Thank You for the reply .... What You understood was exactly correct.... But If N is around 10e8 this process is tidious and will give me a TLE ... I actually need this to solve a problem on spoj (http://www.spoj.com/problems/EASYFACT/) – kevin Jun 10 '15 at 16:42
  • No idea how to do that problem. I'm sure the method I showed is NOT the way to do it for such large number to be honest. – Jack Yoon Jun 10 '15 at 16:50