--- from: http://rosettacode.org/wiki/Numbers_with_equal_rises_and_falls