import string
import math


def get_equivalent_for_integers(number, base, new_num_length):
    """Return the equivalent of a decimal number in the new base. Only integers
       allowed.

       Parameters:
       number: int -- integer representation of number (in base 10)
       base: int -- base to convert to
       new_num_length: int -- how many digits needed in the encoded number

       Return: str -- string representation of number

    """
    # initialize a return value
    new_value = ''
    # list of all English letters
    alpha = list(string.ascii_lowercase)
    # figure out the digit to place at each index in the new number
    for i in range(new_num_length):
        # each iteration the power of the place value decreases
        place_value = math.pow(base, (new_num_length - (i + 1)))
        # the representation of the next digit to add in the new base
        next_digit = int(number // place_value)
        # convert to representation of that value for the appropiate base
        if next_digit > 9:
            index_of_digit = next_digit - 10
            # adding the digit to the new number
            new_value += alpha[index_of_digit]
        else:
            new_value += str(next_digit)
        # decrement the number, so the change reflects on the next iteration
        number -= next_digit * place_value
    return new_value