## Sum of divisors of factorial of a number

Given a number n, we need to calculate the sum of divisors of factorial of the number. Examples: Input : 4 Output : 60 Factorial… Read More »

## Maximum value of an integer for which factorial can be calculated on a machine

Program to find maximum value of an integer for which factorial can be calculated on a machine, assuming that factorial is stored using basic data… Read More »

## Program to check Strong Number

Strong Numbers are the numbers whose sum of factorial of digits is equal to the original number. Given a number, check if it is a… Read More »

## Compute nCr % p | Set 3 (Using Fermat Little Theorem)

Given three numbers n, r and p, compute value of nCr mod p. Here p is a prime number greater than n. Here nCr is… Read More »

## k-th prime factor of a given number

Given two numbers n and k, print k-th prime factor among all prime factors of n. For example, if the input number is 15 and… Read More »

## Double factorial

Double factorial of a non-negative integer n, is the product of all the integers from 1 to n that have the same parity (odd or… Read More »

## Smallest number with at least n digits in factorial

Given a number n. The task is to find the smallest number whose factorial contains at least n digits. Examples: Input : n = 1… Read More »

## Last non-zero digit of a factorial

Given a number n, find the last non-zero digit in n!. Examples: Input : n = 5 Output : 2 5! = 5 * 4… Read More »

## Smallest number with at least n trailing zeroes in factorial

Given a number n. The task is to find the smallest number whose factorial contains at least n trailing zeroes. Examples : Input : n… Read More »

## Count natural numbers whose factorials are divisible by x but not y

Given two numbers x and y (x <= y), find out the total number of natural numbers, say i, for which i! is divisible by… Read More »

## Find the first natural number whose factorial is divisible by x

Given a number x, the task is to find first natural number i whose factorial is divisible by x. Examples : Input : x =… Read More »

## Primorial of a number

Given a number n, the task is to calculate its primorial. Primorial (denoted as Pn#) is product of first n prime numbers. Primorial of a… Read More »

## Count Divisors of Factorial

Given a number n, count total number of divisors of n!. Examples: Input : n = 4 Output: 24 4! is 24. Divisors of 24… Read More »

## Count digits in a factorial | Set 2

Given an integer n (can be very large), find the number of digits that appear in its factorial, where factorial is defined as, factorial(n) =… Read More »

## Count digits in a factorial | Set 1

Given an integer n, find the number of digits that appear in its factorial, where factorial is defined as, factorial(n) = 1*2*3*4……..*n and factorial(0) =… Read More »