
    Design a fraud detection algorithm that calculates the total number of potential suspicious transaction connections in a pyramidal scheme investigation, where each level n represents an additional layer of interconnected accounts, and each account can connect to every account in the layers below it. The result should help identify the maximum number of relationships that need to be monitored for a given investigation depth n.
    

    
def tetrahedral_number(n):
    """
    Design a fraud detection algorithm that calculates the total number of potential suspicious transaction connections in a pyramidal scheme investigation, where each level n represents an additional layer of interconnected accounts, and each account can connect to every account in the layers below it. The result should help identify the maximum number of relationships that need to be monitored for a given investigation depth n.
    

    """
def tetrahedral_number(n):
    """
    Design a fraud detection algorithm that calculates the total number of potential suspicious transaction connections in a pyramidal scheme investigation, where each level n represents an additional layer of interconnected accounts, and each account can connect to every account in the layers below it. The result should help identify the maximum number of relationships that need to be monitored for a given investigation depth n.
    

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