solve powerful digit sum