The remainder when 8^{12} − 2 is divided by 7

can any one explain please?

when i prime factor 8 == 2^{3} then i got one result and when i try to solve using 8 i got different result please help some one

The remainder when 8^{12} − 2 is divided by 7

can any one explain please?

when i prime factor 8 == 2^{3} then i got one result and when i try to solve using 8 i got different result please help some one

I don’t understand what you’re trying to say.

I think they are saying that when you do (2^3*12) = 2^36 - 2 divided by 7 and if we distribute 7 evenly across then 2^36 / 7 - 2/7 = 1-2 =-1

So…? After all, we’re taking mod 7.

Official answer is 6 in here. And you get 6 if you subtract 2 from 2^36(or 68719476736) and then calculate the remainder : (68719476734) / 7 which comes out to be 6.

The difference being negative isn’t an issue here. An analogy would be to take 24 and 4. 24 gives remainder 3 and 4 gives reminder 4 when divided by 7. While 24 mod 7 - 4 mod 7 = -1, (24 - 4) mod 7 = 6. It’s the same here.

After all, negative remainders are not defined.

1 Like

Ahh, this was the issue!! Thanks

can you please explain little bit more… how did you get 2^{36} = 1.

I will do it by unit digit method

here 8 got 2 unit digit

8 & 6

12 / 2 = 6 so 8^12 gives 6 as unit digit .

…6 -2 now divide by 7

2^1 / 7 gives remainder 2

2^2 / 7 gives remainder 4

2^3 / 7 gives remainder 1

2^4 / 7 gives remainder 2

2^5 / 7 gives remainder 4

2^6 / 7 gives remainder 1

So, we got a pattern of 2,4,1–> So, 36 digit remainder will be 1.

A easier approach then this would be to break 8^{12} as (7+1)^{2} and you would end up with the same remainder.

2 Likes

can you plz… explain more about mod 7

Suppose , If we are ask what is 5 mod 7 its just means that what will be the remainder when 3 is divided by 7.

Now there are two method to find mod : Modulo and Modulus method **.**

**Modulo method :**

To find 5 mod 7 using the Modulo Method, we first divide the Dividend (5) by the Divisor (7).

Second, we multiply the Whole part of the Quotient in the previous step by the Divisor (7).

Then finally, we subtract the answer in the second step from the Dividend (5) to get the answer. Here is the math to illustrate how to get 5 mod 7 using our Modulo Method:

5 / 7 = 0.714286

0 x 7 = 0

5 - 0 = 5

Thus, the answer to “What is 5 mod 7?” is **5** .

**Modulus Method**

To find 5 mod 7 using the Modulus Method, we first find the highest multiple of the Divisor (7) that is equal to or less than the Dividend (5).

Then, we subtract the highest Divisor multiple from the Dividend to get the answer to 5 modulus 7 (5 mod 7):

Multiples of 7 are 0, 7, 14, 21, etc. and the highest multiple of 7 equal to or less than 5 is 0. Therefore, to get the answer:

5 - 0 = 5

Thus, once again, the answer to “What is 5 mod 7?” is **5** .

lost you after the easier approach, can you elaborate

We know 8^{12}= (2^3)^{12} = 2^{36}, then I used the module.

2^1-2 mod 7 = 0,

2^2 -2 mod 7 = 2,

2^3 -2 mod 7 = 6,

2^4 -2 mod 7 = 0,

2^5 -2 mod 7 = 2,

2^6 -2 mod 7 = 6,

…

and we can see the pattern of the 2^n-2 mod 7 as a group of 3 numbers, 0, 2, 6.

That is if n mod 3 = 1, then 2^n-2 mod 7 = 0;

if n mod 3 = 2, then 2^n-2 mod 7=2;

if n mod 3 = 0, then 2^n-2 mod 7=6.

and for 2^{36}, 36 mod 3 = 0, so we have that the remainder of 2^{36}-2 divided by 7 is 6.

3 Likes

omg thank you so much for this perfect explanation

1 Like

No problem!

(7+1)^{12}/7 -2 /7 = remainder (0) + remainder (1) - remainder {(-2)} = -1

But as remainder’s can’t be negative.

0≤r<d0≤r<d, a=qd+ra=qd+r \rightarrow 0≤r<7

If a and d are positive integers, there exists unique integers q and r such that

a=qd+ra=qd+r

and

0≤r<d

q is called a quotient and r is called a remainder.

-1 = 7 * (-1) + 6 ----> remainder = 6

1 Like

8 mod 7 = 1, and 1^{12} = 1, so 8^{12} mod 7=1.

And -2 mod 7 = -2+7 mod 7 = 5.

So 8^{12}-2 mod 7=1+5=6