Aspiring Novice
2004-11-24 16:50:17 |
Mod
What does the term 'mod' mean, in terms such as 1 mod 8?
Thanks in advance |
Cory Taylor
2004-11-24 19:09:53 |
Re: Mod
in case nobody else answers...
The mod function has to do with division. This much I know for sure.
I believe that the two parts of a division answer are the mod and the rem, the mod being the number of full times a number is divisible by another, the rem being the portion leftover when all full multiples of the smaller have been taken away from the larger. This would make 1 mod 8 = 8 (or 3 mod 8 =2). But this is only my assumptions as ive come across it - Ive never been formally introduced myself. |
Charlie
2004-11-24 19:48:46 |
Re: Mod
No, actually the mod and the remainder are both just about the same thing. In an integer division, there is a quotient and a remainder. If we are not worried about the quotient at all, the remainder of a / b is called a mod b. For example, 12 mod 8 is 4. The prototypical example is clock time, which is usually mod 12: If it's 10 o'clock, then 4 hours later it will be (10+4) mod 12 = 14 mod 12 = 2. So four hours after 10 o'clock is 2 o'clock. |
Charlie
2004-11-24 19:52:18 |
Re: Mod
So 1 mod 8 is still 1, as are 9 mod 8, 17 mod 8, 25 mod 8, etc.: all of them evaluate as 1. |
Aspiring Novice
2004-11-25 15:11:02 |
Re: Mod
So 121 mod 16= 25 mod 16 because 121/16 and 25/16 both leave a remainder of 9? What about 121^n and 25^n. I read somewhere they are equal? |
Charlie
2004-11-25 16:45:54 |
Re: Mod
Yes, when you raise a number to a power, the modular value of the power will be the same as the modular value of the same power of the original number's modular value. So 121^n mod 16 is equal to 9^n mod 16, and likewise 25^n mod 16 equals 9^n mod 16, because of the modular value of 9 of each of the base numbers. As 9^2 = 81, which is 1 mod 16, the odd values of n, for these two numbers, 121 and 25, have modular values of 9 mod 16 and even values of n give modular values of 1 mod 16. |
Charlie
2004-11-25 16:47:58 |
Re: Mod
The above property is probably most familiar with a mod value of 10 as that is the base of our numbering system. In order to find the last digit of a number raised to a power, you can just take the last digit of the original number and raise to the given power. The last digit of that result will be the same as the last digit of the original value. |
Aspiring Novice
2004-11-26 16:49:31 |
Re: Mod
I think it makes sense now, is this correct: 121^n-25^n will always leave a multiple of sixteen. This is because they will both always be the same number above a multiple of sixteen (sorry if this is a bit unclear; i mean, for example that 25^2 and 121^2 are both 1 more than a multiple of 16) and this is because 121 and 25 both equal 9 mod 16. |
David Shin
2005-01-21 04:16:19 |
Re: Mod
That is correct. 121^n - 25^n = 9^n - 9^n = 0 (mod 16), so it is a multiple of 16. |
Aspiring Novice
2005-01-21 19:33:04 |
Re: Mod
Thanks everyone who helped |