close to a solution on #20

o Factored out sum_digits for problems that require digit summing
o solution to #20 looks correct but is not working because of a bug in bn_format
o wrote a test exposing the bug in bn_format