Skip to main content
4 of 4
added 2 characters in body
Rod
  • 18.6k
  • 4
  • 32
  • 89

Python 2, 140 137 bytes

n=input() x=[] a=[0]*n+[1]+n*[0] z=n%2 exec'x+=[a];a=[(i%2^z)*sum(a[i-1:i+2])for i in range(2*n+1)];z^=1;'*n print map(sum,zip(*x))[1:-1] 

Try it online! or Try it online!

For n=3
Starts with a list with n zeros surround an one - [[0, 0, 0, 1, 0, 0, 0]]
Generate the full pyramid

[[0, 0, 0, 1, 0, 0, 0], [0, 0, 1, 0, 1, 0, 0], [0, 1, 0, 2, 0, 1, 0]] 

Rotate 90º and sum each row, discarding the first and the last one (only zeros)

[[0, 0, 0], [0, 0, 1], [0, 1, 0], [1, 0, 2], [0, 1, 0], [0, 0, 1], [0, 0, 0]] 
Rod
  • 18.6k
  • 4
  • 32
  • 89