If the number by which the factorial number has to be divided is a prime number i.e p and the maximum power of p is n. Let the factorial no. is N
We can check the maximum power of p by
n= [N/p] + [N/p2] + [N/p3] + ........................
Let 72! be the number and we have to find maximum power of 5 which can divide 72! exactly:
Therefore,
n=[72/5] + [72/25] = 14 + 2 = 16.
Wednesday, July 20, 2011
Monday, July 18, 2011
How to find if the no. is prime or not
An easy way of finding if the no. is prime or not can be summarized in the following steps:
1)If the no. ends with 0,2,4,5,6,8 ; it is not prime.
2)Find the square root of the number and round it of to a lower integer. Find if the resultant number is divisible by prime numbers below it. If it is not, it is a prime number and if it is, it is a composite number.
Eg: If we want to check for 181. Square root 181 lies between 13 and 14. Therefore rounding of to lower integer, the resulting number is 13. Since 13 is not divisible by 2,3,5,7,11; we conclude that 181 is a prime number.
Try for higher numbers as well, this method works.
Subscribe to:
Posts (Atom)