Jump to content

Chowla numbers: Difference between revisions

m
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
. snd
. mapAccumL (\total (count, max) -> (total + count, (total + count, max))) 0
. fmap (chowlaPrimes $ take (10^7) allChowlas)
perfects = chowlaPerfects allChowlas
allChowlas = chowlas [1..35 * 10^6]</lang>
{{out}}
<pre>Using 4 cores
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.