
    Design an algorithm that calculates the total number of mathematical concepts a student needs to master when progressing through a three-dimensional learning structure, where each level builds upon all previous levels in a pyramidal fashion. The progression starts from a single foundational concept and expands in three dimensions (breadth, depth, and complexity), with each new level incorporating all concepts from previous levels to determine the student's comprehensive learning milestone.
    

    
def tetrahedral_number(n):
    """
    Design an algorithm that calculates the total number of mathematical concepts a student needs to master when progressing through a three-dimensional learning structure, where each level builds upon all previous levels in a pyramidal fashion. The progression starts from a single foundational concept and expands in three dimensions (breadth, depth, and complexity), with each new level incorporating all concepts from previous levels to determine the student's comprehensive learning milestone.
    

    """
def tetrahedral_number(n):
    """
    Design an algorithm that calculates the total number of mathematical concepts a student needs to master when progressing through a three-dimensional learning structure, where each level builds upon all previous levels in a pyramidal fashion. The progression starts from a single foundational concept and expands in three dimensions (breadth, depth, and complexity), with each new level incorporating all concepts from previous levels to determine the student's comprehensive learning milestone.
    

    """
    return n * (n + 1) * (n + 2) / 6