{"id":18191,"date":"2021-08-26T10:42:16","date_gmt":"2021-08-26T05:12:16","guid":{"rendered":"https:\/\/python-programs.com\/?p=18191"},"modified":"2021-11-22T18:37:13","modified_gmt":"2021-11-22T13:07:13","slug":"python-program-to-count-divisors-of-factorial","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-program-to-count-divisors-of-factorial\/","title":{"rendered":"Python Program to Count Divisors of Factorial"},"content":{"rendered":"

In the previous article, we have discussed Python Program to Reorder a List According to Given Indexes<\/a>
\nFactorial:<\/strong><\/p>\n

The product of all positive integers less than or equal to n is the factorial of a non-negative integer n, denoted by n! in mathematics:<\/p>\n

n! = n * (n – 1) *(n – 2) * . . . . . . . . . . 3 * 2 * 1.<\/strong><\/p>\n

4 != 4 * 3 * 2 *1= 24<\/p>\n

Given a number and the task is to count divisors of factorial of a given number.<\/p>\n

For example :<\/p>\n

Let N=6<\/p>\n

The divisors of factorial of a given number{ 6 }: 1 2 3 4 5 6 8 9 10 12 15 16 18 20 24 30 36 40 45 48 60 72 80 90 120 144 180 240 360 720<\/p>\n

The count of divisors of factorial of a given number{ 6 }= 30<\/p>\n

Examples:<\/strong><\/p>\n

Example 1:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

Given Number = 7<\/pre>\n

Output:<\/strong><\/p>\n

The divisors of factorial of a given number{ 7 }:\r\n1 2 3 4 5 6 7 8 9 10 12 14 15 16 18 20 21 24 28 30 35 36 40 42 45 48 56 60 63 70 72 80 84 90 105 112 120 126 140 144 168 180 210 240 252 280 315 336 360 420 504 560 630 720 840 1008 1260 1680 2520 5040 \r\nThe count of divisors of factorial of a given number{ 7 }= 60<\/pre>\n

Example 2:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

Given Number = 4<\/pre>\n

Output:<\/strong><\/p>\n

The divisors of factorial of a given number{ 4 }:\r\n1 2 3 4 6 8 12 24 \r\nThe count of divisors of factorial of a given number{ 4 }= 8<\/pre>\n

Program to Count Divisors of Factorial in Python<\/h2>\n

Below are the ways to count divisors of factorial of a given number.<\/p>\n