Numbers whose binary and ternary digit sums are prime: Difference between revisions

m
Line 257:
go 0 = 0
go n = uncurry (+) (first go $ quotRem n base)
 
 
--------------------------- TEST -------------------------
main :: IO ()
main =
in putStrLn $
let xs =
show (length [1 .. 199]xs)
<> " matches in [1..199]\n\n"
>>= \x -> [show x | digitSumsPrime x [2, 3]]
<> table xs
in putStrLn $
where
show (length xs)
let xs =
<> " matches in [1..199]\n\n"
[1 .. <> table xs199]
>>= \x -> [show x | digitSumsPrime x [2, 3]]
 
------------------------- DISPLAY -----------------------
9,659

edits