returns True if the given list is identical to Reverse[list], and False otherwise.
returns True if the integer n is identical to IntegerReverse[n], and False otherwise.
returns True if the given string is identical to StringReverse[string], and False otherwise.
Details and Options
- Possible options of PalindromeQ are:
IgnoreCase False whether lowercase and uppercase letters should be treated as equivalent IgnoreDiacritics False whether diacritics should be ignored Language $Language what language or alphabet to assume
Examplesopen allclose all
Basic Examples (3)
Generalizations & Extensions (1)
By default, lowercase and uppercase letters are considered different:
Use IgnoreCase->True to treat them as equivalent:
Tetradic numbers remain invariant when flipped back to front and up-down. Hence they only contain digits 0, 1, 8. These are all tetradic numbers with up to five digits:
It is conjectured that this algorithm eventually produces a palindromic number for every decimal input:
There are numbers for which it is not known whether the algorithm succeeds, the smallest being 196:
Find the palindromic Roman numerals up to 1000:
Properties & Relations (3)
The empty list is considered a palindrome:
The null string is considered a palindrome:
One-digit decimal numbers are considered palindromes:
By default, a string is considered palindromic if its list of characters is palindromic:
The first nine coefficients of this series expansion are special palindromic numbers:
Those coefficients can also be generated as squares of repunits 1, 11, 111, etc.:
Wolfram Research (2015), PalindromeQ, Wolfram Language function, https://reference.wolfram.com/language/ref/PalindromeQ.html (updated 2016).
Wolfram Language. 2015. "PalindromeQ." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/PalindromeQ.html.
Wolfram Language. (2015). PalindromeQ. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PalindromeQ.html