def seq_encode(number, symbols):
    """
    Encode a number using a sequence of symbols.

    :param int number: number to encode
    :param symbols: sequence key
    :type symbols: str or list[char]
    :returns: encoded value
    :rtype: str
    """
    d, m = divmod(number, len(symbols))
    if d > 0:
        return seq_encode(d, symbols) + symbols[m]
    return symbols[m]