Talk:Numbers whose count of divisors is prime: Difference between revisions

From Rosetta Code
Content added Content deleted
m (small comment)
(Further comment.)
Line 8: Line 8:
:Brilliant, thanks! --[[User:PureFox|PureFox]] ([[User talk:PureFox|talk]]) 15:42, 11 July 2021 (UTC)
:Brilliant, thanks! --[[User:PureFox|PureFox]] ([[User talk:PureFox|talk]]) 15:42, 11 July 2021 (UTC)
::I think, Nigel enjoys weekend :-) [[User:Horsth|Horsth]] 15:47, 11 July 2021 (UTC)
::I think, Nigel enjoys weekend :-) [[User:Horsth|Horsth]] 15:47, 11 July 2021 (UTC)
:::Yes, he's usually onto these like a flash :) --[[User:PureFox|PureFox]] ([[User talk:PureFox|talk]]) 16:17, 11 July 2021 (UTC)

Revision as of 16:17, 11 July 2021

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.Horsth

Brilliant, thanks! --PureFox (talk) 15:42, 11 July 2021 (UTC)
I think, Nigel enjoys weekend :-) Horsth 15:47, 11 July 2021 (UTC)
Yes, he's usually onto these like a flash :) --PureFox (talk) 16:17, 11 July 2021 (UTC)