def TargetIndex(targetRow: int, targetColumn: int) -> int:
    """
             1   2   3   4   5   6
       ---+---+---+---+---+---+---+
        1 |  1   3   6  10  15  21
        2 |  2   5   9  14  20
        3 |  4   8  13  19
        4 |  7  12  18
        5 | 11  17
        6 | 16
    """
    target_index = (((targetRow + targetColumn - 1) ** 2 +
                    targetRow + targetColumn - 1) // 2) - (targetRow - 1)
    return target_index