Suppose you're talking about N factorial. For an example, we'll let N be 20.
For each Prime number p, repeatedly divide N by p, discarding the remainder. Add up the answers.
20/2 = 10, 10/2 = 5, 5/2 = 2, 2/2 = 1. 10+5+2+1 = 18.
20/3 = 6, 6/3 = 2. 6+2 = 8.
20/5 = 4
20/7 = 2
20/11 = 1
20/13 = 1
20/17 = 1
20/19 = 1
Now add 1 to each of these results: 19,9,5,3,2,2,2,2.
Now multiply these numbers. 19x9x5x3x2x2x2x2 = 41040.
This is how many factors the factorial has. 20! has 41040 factors. (This includes both 1 and the factorial itself. Subtract 1 if you're only counting the proper factors.)
The proof is left as an exercise for the reader.
It is impossible to determine what number has the most factors because there are an infinite number of numbers.
The factorial of a number is the product of all the whole numbers, except zero, that are less than or equal to that number.
a factorial number is a number multiplied by all the positive integers i.e. 4!=1x2x3x4=24 pi!=0.14x1.14x2.14x3.14 0!=1
Factorial 10 to the power factorial 10 will have 7257600 zeros.
A factorial is a whole number multiplied by all the whole numbers less than that number. So 3 factorial (written as 3!) is 3 times 2 times 1=6
1,2,3,4,5
270
The factorial of 569 is 569 * 568 * 567 * ... * 3 * 2 * 1. (That is a very, very large number.) If you mean, however, "what are the factors of 569?", the answer is 1 and 569, because 569 is prime.
#include <iostream> using namespace std; int main() { int i, number=0, factorial=1; // User input must be an integer number between 1 and 10 while(number<1 number>10) { cout << "Enter integer number (1-10) = "; cin >> number; } // Calculate the factorial with a FOR loop for(i=1; i<=number; i++) { factorial = factorial*i; } // Output result cout << "Factorial = " << factorial << endl;
double factorial(double N){double total = 1;while (N > 1){total *= N;N--;}return total; // We are returning the value in variable title total//return factorial;}int main(){double myNumber = 0;cout > myNumber;cout
Pseudo code+factorial
It is impossible to determine what number has the most factors because there are an infinite number of numbers.
Squares of prime numbers have three factors.
limiting factors
The question, as asked, is difficult to answer, The number of zeros in factorial 100 is not the same as the number of 0s at the end of factorial 100 since there will be some before the end.The answer to the second question is easy:The number of zeros is determined by the number of 10s in the factors.Since 2s are common, this, in turn, depends on the number of 5s.In 100!, there are 20 multiples of 5 each of which will contribute a 5 to the factors of 100!.In addition there are 4 multiples of 52 = 25 each of which will contribute another 5 to the factors of 100!All in all, therefore, there are 24 5s giving 24 0s at the end of 100!
A prime number only has two factors. If the number you're looking at has more than two factors, it is not prime.
You determine it by the denominator.