Why is
$347 \bmod 6 = 5$
but
$-347 \bmod 6 = 1$
What is the difference?
Why is
$347 \bmod 6 = 5$
but
$-347 \bmod 6 = 1$
What is the difference?
If $a\equiv b\pmod n$, then $(-a)\equiv (-b)\pmod n$. Thus $-347 \equiv -5 \equiv 1\pmod 6$.
Hint:-
The basic difference lies here-
$(a-b)\neq(-a-b)\text{ or}-(a+b)$
$(347-5)=342$ but $(-347-1)=-348$ both of which are divisible by $6$.