Anonymous user
Sequence: smallest number greater than previous term with exactly n divisors: Difference between revisions
Sequence: smallest number greater than previous term with exactly n divisors (view source)
Revision as of 13:52, 18 July 2020
, 3 years ago→{{header|Haskell}}
(Added Wren) |
|||
Line 330:
sequence_A069654 = go 1 $ (,) <*> countDivisors <$> [1..]
where
go t ((n,c):xs) | c == t = (t,n):go (succ t) xs
countDivisors n = foldr f 0 [1..floor $ sqrt $ realToFrac n]▼
where▼
▲ | otherwise = r
| otherwise
main :: IO ()
|