Talk:Numbers whose count of divisors is prime

From Rosetta Code
Revision as of 15:07, 11 July 2021 by rosettacode>Horsth (→‎The question is: Which numbers got odd count of divisors: new section)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The question is: Which numbers got odd count of divisors

If you look at prime decompostion of a number like n = p1^a*p2^b*...pn^z,
than the count of divisors is CoD = (a+1)*(b+1)*(c+1)*....(z+1). That is only possible if all a..z are even.
That means all n has to be m*m.
Therefor only square numbers need to be tested.