It is necessary to know that a,b are integers and n,p are positive integers.
We must prove that S is the number of integers n mod p between a and b.
You should know that I found an equivalence between n mod p and n - p*floor(n/p).
Thanks for the help!
Ok so i finally prove it !