Anonymous user
Chowla numbers: Difference between revisions
m
→{{header|Haskell}}
m (changed the appearance of an apparent unary (negative) operator.) |
|||
Line 1,578:
printf "There are %2d perfect numbers < 35,000,000\n" $ length perfects
where
chowlaP = fmap (bimap commas commas) . snd
. mapAccumL (\total (count, max) -> (total + count, (total + count, max))) 0
. fmap (chowlaPrimes $ take (10^7) allChowlas)
perfects = chowlaPerfects allChowlas
allChowlas = chowlas [1..35
{{out}}
<pre>Using 4 cores
|