There are 1 * 3 = <<1*3=3>>3 blocks in the second layer.

There are 3 * 3 = <<3*3=9>>9 blocks in the third layer.

There are 9 * 3 = <<9*3=27>>27 blocks in the fourth layer.

Thus, there are 1 + 3 + 9 + 27 = <<1+3+9+27=40>>40 sandstone blocks in the pyramid.

# Answer

40
<|im_start|>system
You are a helpful assistant.<|im_end|>
<|im_start|>user
A four-layer pyramid is being built with each layer having three times as many sandstone blocks as the layer above it. The top layer is a single block. How many sandstone blocks are in the pyramid?
Please reason step by step, and put your final answer within \boxed{{}}.<|im_end|>
<|im_start|>assistant

user
40
A four-layer pyramid is being built with each layer having three times as many sandstone blocks as the layer above it. The top layer is a single block. How many sandstone blocks are in the pyramid?
train