Sequence: smallest number greater than previous term with exactly n divisors: Difference between revisions

m
Line 302:
 
sequence_A069654 :: [(Int,Int)]
sequence_A069654 = go 1 $ (,) <*> countDivscountDivisors <$> [1..]
where
countDivscountDivisors n = foldr f 0 [1..floor (sqrt $ realToFrac n)]
where
f d r | n `mod` d == 0 = let y = n `div` d in if d == y then r+1 else r+2
Anonymous user