APL (Dyalog Unicode), 12 bytes
⎕(+-|⍨)¨1+⍳3
Explanation:
⎕(+-|⍨)¨1+⍳3
1+⍳3 ⍝ 2 3 4
⎕ ⍝ read n
+-|⍨ ⍝ {⍺ + ⍵ - ⍵ | ⍺}
Let's look at how {⍺ + ⍵ - ⍵ | ⍺} is transformed to +-|⍨:
{⍺ + ⍵ - ⍵ | ⍺}
{⍺} + {⍵ - ⍵ | ⍺}
⊣ + ({⍵} - {⍵ | ⍺})
⊣ + (⊢ - ({⍵} | {⍺}))
⊣ + (⊢ - (⊢ | ⊣))
(⊣ + ⊢ - (⊢ | ⊣))
(+ - (⊢ | ⊣))
(+ - (⊣ |⍨ ⊢))
(+ - (|⍨))
(+-|⍨)