On m-ary partitions