J, 23 22 chars
(+/ .*&2 3 4 1@(+<./))
Example:
test =. 3 5 4 3
(+/ .*&2 3 4 1@(+<./)) test
70
(23 long explicit function definition: v=:3 :'+/+/\.3|.y+<./y'
)
(+/ .*&2 3 4 1@(+<./))
Example:
test =. 3 5 4 3
(+/ .*&2 3 4 1@(+<./)) test
70
(23 long explicit function definition: v=:3 :'+/+/\.3|.y+<./y'
)