#05AB1E, 5 3 bytes
05AB1E, 5 3 bytes
Saved 2 bytes thanks to Adnan
Ý+Æ Explanation
Takes P then N as input.
# implicit input, ex 5, 100 Ý # range(0,X): [0,1,2,3,4,5] + # add: [100,101,102,103,104,105] Æ # reduced subtraction: 100-101-102-103-104-105