APL (Dyalog), 29 bytes 1 byte header and footer
{t←⍬≡⍵:,0⋄1=⍴⍵:1,0⋄(+/2↑⍵),⍵}
With the header ⍬ (an empty vector) and footer ⊃ (right), the code looks as follows:
⊃{t←⍬≡⍵:,0⋄1=⍴⍵:1,0⋄(+/2↑⍵),⍵}⍬
⊃{t←⍬≡⍵:,0⋄1=⍴⍵:1,0⋄(+/2↑⍵),⍵}{t←⍬≡⍵:,0⋄1=⍴⍵:1,0⋄(+/2↑⍵),⍵}⍬
and so on.
boltcapt
- 121
- 3