jnelson0612 Wrote:thakurneelabh Wrote:Hi,
It is, however, the case when counting the total number of factors of a number. A prime number always has an odd number of total factors and a non-prime number always has an even number of total factors.
I have to disagree with this also.
A prime number always has an even number of factors: 1 and itself, or two factors.
A non-prime number may have an even or odd number of factors. For example, 6 has factors 1, 2, 3, and 6, or an even number of factors. 4 has factors 1, 2, and 4, or an odd number of factors. A perfect square will have an odd number of factors because the square root is counted only once.
oops! sorry i typed "prime" when what i meant was "perfect square" and "non prime" when i meant "not a perfect square" For example 9 is a perfect square, having factors 1,3,9 (total number factors= 3= an odd number) whereas 8, a non perfect square number, has factors 1,2,4,8 (total number of factors= 4= even number).
There is a simple way of calculating the total number of factors of a given number. We'll pick number 144, which can be expressed as a product of all its prime numbers. 144= 2*2*2*2*3*3, which can in turn be written as 2^4 *3^2. Now, the total number of factors is given by adding 1 to each of the powers to which the different prime numbers are raised to and multiplying them together (Notice that powers of 1 are not counted here as we are talking only about prime numbers and 1 is NOT a prime number). In this specific example, total number of factors= (4+1)*(2+1)= 15. Since 144 is a perfect square, its total number of factors is an odd number. You may try this with other numbers..