Anonymous user
Sequence: nth number with exactly n divisors: Difference between revisions
Sequence: nth number with exactly n divisors (view source)
Revision as of 17:44, 16 May 2020
, 4 years ago→{{header|Haskell}}
No edit summary |
|||
Line 414:
calc n = do
x <- [1..]
guard (even n || odd n && f x
[(x, divisorCount x)]
where f n = floor (sqrt $ realToFrac n) ^ 2
havingNthDivisors :: Integer -> [(Integer, Integer)]
Line 465:
(29,1116713952456127112240969687448211536647543601817400964721)
(30,6768)</pre>
=={{header|Java}}==
|