#Pyth, 11 bytes
Pyth, 11 bytes
Ms+Gm_+GdSH A function g that takes input of n and p via argument and prints the result. It can be called in the form gn p.
How it works
Ms+Gm_+GdSH Function g. Inputs: G, H M g=lambda G,H: SH 1-indexed range, yielding [1, 2, 3, ..., H] m_+Gd Map lambda d:-(G+d) over the above, yielding [-(G+1), -(G+2), -(G+3), ..., -(G+H)] +G Add G to the above, yielding [G, -(G+1), -(G+2), -(G+3), ..., -(G+H)] s Reduce on addition with base case 0, yielding G-(G+1)-(G+2)-(G+3)... -(G+H) Implicitly print