The remainder in 1%3 refers to what remains of 1 (not 3) after you divide by 3. As you have already said, 3 goes into 1 zero times. So -- when you remove 0 multiples of 3 from 1, all of 1 remains. Thus 1 % 3 = 1.
Videos
How much is 17 mod 3?
17 mod 3 equals 2 since dividing 17 by 3 gives a quotient of 5 and a remainder of 2. The remainder is the result of the modulus operation. In simpler terms, 17 mod 3 = 2.
How to calculate modulo division?
To calculate modulo division: subtract the divisor from the dividend until the resultant is less than the divisor.
What is a modulo operator?
The modulo operator is used to find the remainder during a division of two numbers. The operator is represented by the symbol % in most programming languages. It is also known as the remainder operator. As an example, 5 mod 2 returns 1.
The remainder in 1%3 refers to what remains of 1 (not 3) after you divide by 3. As you have already said, 3 goes into 1 zero times. So -- when you remove 0 multiples of 3 from 1, all of 1 remains. Thus 1 % 3 = 1.
The result of a modulo operation n % m is just that number r for which q * m + r = n (q may be anything). The only requirement we have is that 0 <= r < m.
So for instance:
7 % 5 --> 1 * 5 + 2 == 7 --> r = 2
1 % 3 --> 0 * 3 + 1 == 1 --> r = 1
A few days ago I made an observation that every power of 4 (or at least as high as I cared to check in my head) is one more than a multiple of 3.
Obviously every power of 3 is one more than a multiple of 2 since powers of 3 must be odd and thus 1 larger than some even integer.
I theorized that the relation nk mod (n-1) = 1 holds when n is a natural number larger than 1 and k is a natural number.
I assume that others have discovered this before me and since it has held for every n and k that I checked (within the domain) I was wondering
why does this relation hold?
how would someone prove this?