bitsum :: Int -> Int
-- testing 8 combinations of argument values
-- pruning with 21/25 rules
-- 3 candidates of size 1
-- 2 candidates of size 2
-- 4 candidates of size 3
-- 8 candidates of size 4
-- 19 candidates of size 5
-- 56 candidates of size 6
-- 152 candidates of size 7
-- tested 216 candidates
bitsum 0  =  0
bitsum x  =  parity x + bitsum (halve x)

bitsum :: Int -> Int
-- testing 8 combinations of argument values
-- pruning with 27/32 rules
-- 4 candidates of size 1
-- 0 candidates of size 2
-- 15 candidates of size 3
-- 0 candidates of size 4
-- 233 candidates of size 5
-- 0 candidates of size 6
-- 4297 candidates of size 7
-- 72 candidates of size 8
-- 85204 candidates of size 9
-- tested 88434 candidates
bitsum 0  =  0
bitsum x  =  x `mod` 2 + bitsum (x `div` 2)

