A diagram showing a triangular wall made of bricks. The top layer has 1 brick, the second layer has 2 bricks, the third layer has 3 bricks, and the fourth layer has 4 bricks. Below the fourth layer is an ellipsis, indicating the pattern continues.
A bricklayer builds a triangular wall with layers of bricks as shown. If the bricklayer uses 171 bricks, how many layers did he build?