import re


def is_palindromic(n, base=10):
    """
    Checks whether a given positive integer ``n``, specified either as a
    numeric literal (binary, octal, decimal or hexadecimal) or a string, has
    a symmetrical digit sequence, i.e. the sequence of its digits is the same
    left to right vs right to left.

    Examples
    ========

    >>> from sympy.ntheory import is_palindromic

    >>> is_palindromic(1, 10)
    True

    >>> is_palindromic(33, 10)
    True

    >>> is_palindromic(-919, 10)
    True

    >>> is_palindromic(0b101, 2)
    True

    >>> is_palindromic(-0b01010010,2)
    False

    >>> is_palindromic(0o7610167, 8)
    True

    >>> is_palindromic(-0o7611167, 8)
    True

    >>> is_palindromic(0xFA0100AF, 16)
    False

    >>> is_palindromic(0xFA0110AF, 16)
    True

    """
    if base < 2:
        raise ValueError('The base must be at least 2')

    if not (isinstance(n, int) and isinstance(base, int)):
        raise TypeError('`n` and `base` must both be integer literals')

    base_func = {**{base: str}, **{2: bin, 8: oct, 10: str, 16: hex}}
    s = re.sub(r'^(-)?(0[a-z]{1})?', '', base_func[base](n))
    m = len(s)

    return s[:int(m / 2)] == (s[int(m / 2):] if not m % 2 else s[int(m / 2) + 1:])[::-1]