Anonymous user
Sequence: nth number with exactly n divisors: Difference between revisions
Sequence: nth number with exactly n divisors (view source)
Revision as of 18:00, 16 May 2020
, 4 years ago→{{header|Haskell}}
Line 423:
n <- [1..30] :: [Integer]
if isPrime n then
pure (n,
else
pure (n, f n)
where
f n = fst (havingNthDivisors n !! pred (fromIntegral n))
nthPrime n = unPrime (toEnum n :: Prime Integer)
main :: IO ()
|