Finding remainder of a large number
The below is an important question which has been asked in many exams.
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
If 7126 is not divisible by 48, find the remainder?
Normal Approach :
For calculating the remainder we first calculate the original value for number 7126 and divide it by 48 and obtain the remainder.
It is very long and time taking process and it is not at all feasible to solve it in this way. So we use some important mathematical concepts related to divisibility to solve this problem.
Speedy approach :
Important concepts for solving problem,
- (xn – an) divisible by (x – a) for every n (n belongs to integers)
- (xn – an) divisible by (x + a) for every even number n (n belongs to integers)
- (xn – an) divisible by (x + a) for every odd number n (n belongs to integers)
And we also use another basic formula;
Dividend = divisor x quotient + remainder
The given number is in a form such that the base is very near to 48.
This is done by using the formula ( amn ) = (am)n
7126 = (72)63 = 4963
Now by using our mathematical formulae we should add or subtract a number to 4963 such that it is divisible by 48.
(4963 – 1) = (4963 - 163)
By comparing it with (xn – an) we can write,
x = 49, n = 63 and a = 1
Therefore from the above we get that
( 4963 – 163) is divisible by (49-1) and (49+1)
So, (4963 – 1) is divisible by 48
Let (4963 – 1)/48 = q (where q is the quotient )
4963 – 1 = 48 x q 4963 = 48 x q + 1 7126 = 48 x q + 1
Dividend = divisor * quotient + remainder
So from above when the dividend = 7126 and the divisor = 48, then the remainder is 1.
So when 7126 is divided by 48, the remainder is 1.
In this way we can obtain the remainder for such large numbers. It takes very less time and is very useful in competitive exams.