Are there any resources/tutorials on the properties of mod ?
see this
1 - http://en.wikipedia.org/wiki/Modulo_operation
2 - http://en.wikipedia.org/wiki/Modular_arithmetic
3 - http://mathworld.wolfram.com/Congruence.html
4 - https://brilliant.org/discussions/thread/modular-arithmetic-2/