Determin whether a number is a palidrome

use recurse without the extra memory