determines if a number is a palindrome