generalize timesInteger() and plusInteger() to Number