Increasing gaps between consecutive Niven numbers: Difference between revisions
Content added Content deleted
Line 221:
import Data.List (intercalate, unfoldr)
import Data.List.Split (chunksOf)
import Data.Tuple (swap)
nivens :: [Int]
Line 228 ⟶ 229:
pure n
where
digitSum = sum . unfoldr (\x -> guard (x > 0) >> pure (
findGaps :: [(Int, Int, Int)]
|