Hi all,
How would you calculate (3+15)mod7 or (6^4)mod7?
I don't know anything about modulo. I read an article about it on Wikipedia, but there doesn't seem to be an example which fits the question I have above.
Thanks for the help!
To perform an operation modulo n, simply perform the operation as you would normally do, then divide it by n. The result you want is the remainder of the division. For example, 3 plus 15 modulo 7 is equivalent to 4 (3 + 15 = 18, 18 when divided by 7 gives a remainder of 4).
Hope that helps!
If you are in "mod 6", then every integer corresponds to 0, 1, 2, 3, 4 or 5 (note that it cannot result in a negative integer). A table, such as stapel's, allows you to quickly convert any integer (positive or negative) into its "mod 6 version". Check the lower line for your number, in this case -3. It corresponds to what number? 3.
I see, so 3 is the answer...but when I type -3mod6 into a calculator it returns an answer of -3. Why is this?
Using http://www.math.uga.edu/~bjones/calc/ it returns an answer of 1...
This is why I am confused lol
3 different answers...
Just FYI you can simpily cacluations breaking it up into factors
Note that
$\displaystyle 6^4=2^4\cdot 3^4 = 8\cdot 2 \cdot 9 \cdot 9 $
We can reduce each of these factors mod 7 to get
$\displaystyle 8\cdot 2 \cdot 9 \cdot 9 \mod (7) = 1\cdot 2 \cdot 2 \cdot 2 \mod(7) =8 \mod(7)=1\mod(7)$
Just a little more formal treatment.
Two integers a and b are said to be congruent modulo n if and only if $\displaystyle n|(a-b)$. That is n divides the difference between the two numbers. That means there is an integer k such that $\displaystyle nk=a-b$.
With this you can see the integers are partitioned into n equivalence classes. In particular, multiplication is well defined (a similar argument shows addition is also well defined).
(ab) mod n = (a mod n) (b mod n) That is it doesnt matter if you reduce modulo n first before you multiply.
$\displaystyle (a + nk)(b+ nl)=ab + nal + nbk + n^2kl = ab + n(al + bk + nkl)$
but certainly $\displaystyle n|ab - ab + n(al + bk + nkl)= n(al + bk + nkl)$.
$\displaystyle (a + nk)+ (b +nl) = (a+b) + n(k+l)$
$\displaystyle n|(a+ b) - (a+b) + n(k+l) = n(k+l)$
In particular, this puts $\displaystyle \emptyset$'s attack on firm foundation and in general greatly reduces computations.