设第n层有an个,则a1=1,an=a(n-1)+n,所以an=a1+(a2-a1)+……+(an-a(n-1))
=1+2+……+n=n(n+1)/2
Sn=(1/2)[n(n+1)(2n+1)/6+n(n+1)/2]=n(n+1)(n+2)/6,即前n层共有n(n+1)(n+2)/6个
设第n层有an个,则a1=1,an=a(n-1)+n,所以an=a1+(a2-a1)+……+(an-a(n-1))
=1+2+……+n=n(n+1)/2
Sn=(1/2)[n(n+1)(2n+1)/6+n(n+1)/2]=n(n+1)(n+2)/6,即前n层共有n(n+1)(n+2)/6个