Problem:
How many positive integers less than 50 have an odd number of positive integer divisors?
Answer Choices:
A. 3
B. 5
C. 7
D. 9
E. 11
Solution:
Let N be a positive integer and d a divisor of N. Then dN​ is also : divisor of N. Thus the divisors of N occur in pairs d,dN​ and these two divisors will be distinct unless N is a perfect square and d=N​. It follows that N has an odd number of divisors if and only if N is a perfect square. There are 7 perfect squares among the numbers 1,2,3,…,50.
Note. If N>1 is an integer then N=p1r1​​⋅p2r2​​⋅…⋅pkrk​​ where pi​ is the ith prime. The divisors of N are those d=p1s1​​⋅p2s2​​⋅…⋅pksk​​ with 0≤si​≤ri​ for all i. Thus, N has (r1​+1)⋅(r2​+1)⋅…⋅(rk​+1) divisors, a product which will be an odd number only when each ri​ is even.