Each character (and each pair of adjacent characters) is treated as a potential center of a palindrome. Expand outwards while the characters match. Keep track of the longest palindrome found.
Definition: An integer n is strictly palindromic if, for every base b between 2 and n-2 (inclusive), the representation of n in base b reads the same backward as forward (i.e., is a palindrome). Task: ...