Vips0000 wrote:

Hi,

I've a question on finding out number of even and odd factors of a number. Is there any quick method to identify how many 'even' or 'odd' factors a number would have.

Eg. how many 'even' factors does 144n have, where n is a prime number greater than 2. we can quickly identify, since 144=2^4*3^2 so there would be 30 factors of 144n but, how many even and how many odd?

Thanks.

You can arrive at the answer on your own if you understand (not just 'know' but 'understand') how to calculate the total number of factors of a number.

Say, a number N = 2^a * 3*b * 7^c

Total number of factors = (a + 1)(b + 1)(c + 1)

Why? because you can choose each prime number in (power + 1) ways, the additional 1 being for the case in which you don't choose the prime number. So you can select a 2 for the factor in (a + 1) ways.

You should go through this post first if you are not comfortable with this concept:

http://www.veritasprep.com/blog/2010/12 ... ly-number/Now, say the number is N = 2^a * 3*b * 7^c

How many factors will be even? What do you need for even factors? At least one 2. In how many ways can you do it?

In a*(b + 1)*(c + 1) ways

(the 1 additional way in which you don't pick a 2 has been removed. Rest everything is the same.)

How many will be odd? Now you don't want a 2. So, you get 1*(b+1)*(c +1 ) ways

Similarly, you can pose tons of questions: How many factors will be multiples of 4/6/21 etc? How many factors will have all the primes (2, 3 and 7)? etc