import typing


def calcNthTerm(a_1: typing.Union[float, int], r: typing.Union[float, int], n: typing.Union[float, int]) -> typing.Union[float, int]:
    """
    Calculates the nth term of a geometric progression (an = a1 * r^(n-1)).
    :param a_1: First term.
    :param r: Common ratio.
    :param n: Number of desired term.
    :return: Float or integer.
    """
    return a_1 * r ** (n - 1)