here we have not taken 1 in the range because every number can be divisible by 1 and and every number will be divisible by itself as well .
That’s why we have not included 1and n so that we can check whether the number is divisible by any other number in between the range .
if you have doubt you can ask here .
Happy Learning !!